/* =========================================
   CSS Variables
   ========================================= */
:root {
    /* Colors */
    --bg-main: #050505;
    --bg-secondary: #0a0a0a;
    --bg-panel: rgba(15, 15, 15, 0.85);
    
    --accent-primary: #00ff41; /* Hacker Green */
    --accent-secondary: #ff003c; /* Aggressive Red */
    --accent-glow: rgba(0, 255, 65, 0.6);
    --accent-glow-red: rgba(255, 0, 60, 0.6);
    
    --text-primary: #e0e0e0;
    --text-muted: #888;
    --text-dark: #003b00;
    
    --border-color: #222;
    --border-accent: rgba(0, 255, 65, 0.5);

    /* Typography */
    --font-heading: 'Share Tech Mono', monospace;
    --font-body: 'Inter', sans-serif;

    /* Layout & Utilities */
    --radius-small: 8px; /* Smooth rounded corners for modern look */
    --radius-medium: 12px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* =========================================
   Reset & Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Matrix Background Canvas */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.15;
}

/* Scanlines Effect - removed for modern look */
.scanlines {
    display: none;
}

/* Typography */
h1, h2, h3, h4, .panel-title, .status {
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.highlight {
    color: var(--accent-primary);
}

.muted {
    color: var(--text-muted);
}

/* =========================================
   Layout Containers
   ========================================= */
.layout-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* =========================================
   Sidebars & Widgets
   ========================================= */
.sidebar {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 4rem;
}

.sidebar h3 {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.contact-email {
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.contact-email:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 8px var(--accent-glow);
}

.sidebar-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

/* =========================================
   Language Switcher
   ========================================= */
.lang-switch {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

.lang-btn {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.3rem 0.8rem;
    font-family: var(--font-heading);
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-normal);
}

.lang-btn:hover {
    border-color: #555;
    color: #fff;
}

.lang-btn.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

/* =========================================
   Header & Glitch Effect
   ========================================= */
.header {
    text-align: center;
    margin-top: 2rem;
}

.logo {
    font-size: 4rem;
    color: var(--accent-primary);
    position: relative;
    display: inline-block;
    letter-spacing: 2px;
    text-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-glow);
    animation: hardcore-pulse 2s infinite;
}

@keyframes hardcore-pulse {
    0%, 100% { text-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-glow); }
    50% { text-shadow: 0 0 25px var(--accent-glow-red), 0 0 50px var(--accent-glow-red); color: #fff; }
}

/* Glitch Animation */
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(77px, 9999px, 86px, 0); }
    20% { clip: rect(10px, 9999px, 80px, 0); }
    40% { clip: rect(97px, 9999px, 11px, 0); }
    60% { clip: rect(65px, 9999px, 63px, 0); }
    80% { clip: rect(81px, 9999px, 31px, 0); }
    100% { clip: rect(13px, 9999px, 78px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(3px, 9999px, 4px, 0); }
    40% { clip: rect(44px, 9999px, 50px, 0); }
    60% { clip: rect(89px, 9999px, 20px, 0); }
    80% { clip: rect(2px, 9999px, 88px, 0); }
    100% { clip: rect(55px, 9999px, 32px, 0); }
}

.subtitle {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* =========================================
   Announcement Panel (Terminal Style)
   ========================================= */
.announcement-panel {
    background: var(--bg-panel);
    border: 2px solid transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-glow);
    backdrop-filter: blur(10px);
    position: relative;
    border-radius: var(--radius-medium);
    overflow: hidden;
    background-clip: padding-box;
}

/* Hype Animated Border */
.announcement-panel::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    background-size: 400% 400%;
    z-index: -1;
    animation: gradient-border 3s ease infinite;
    border-radius: var(--radius-medium);
}

@keyframes gradient-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.panel-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.panel-title {
    font-size: 1.1rem;
    color: var(--accent-primary);
    letter-spacing: 2px;
    margin: 0;
}

.panel-content {
    padding: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.panel-content p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Ensure tabs content text matches exactly */
.tab-content p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.tab-content h3 {
    font-size: 1.25rem;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--accent-primary);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

/* =========================================
   Servers Grid & Cards
   ========================================= */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.server-card {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition-normal);
    border-radius: var(--radius-medium);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.server-card:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 10px 40px var(--accent-glow-red);
    transform: translateY(-5px) scale(1.02);
    animation: hype-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes hype-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0) scale(1.02); }
    20%, 80% { transform: translate3d(2px, 0, 0) scale(1.02); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0) scale(1.02); }
    40%, 60% { transform: translate3d(4px, 0, 0) scale(1.02); }
}

.card-border-top {
    height: 4px;
    width: 0%;
    background: var(--accent-secondary);
    transition: width 0.4s ease;
    box-shadow: 0 0 15px var(--accent-secondary);
}

.server-card:hover .card-border-top {
    width: 100%;
}

.card-content {
    padding: 1.5rem;
}

.server-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    border-radius: 4px;
    transition: var(--transition-normal);
}
.btn:hover {
    background: var(--accent-primary);
    color: var(--bg-main);
    box-shadow: 0 0 15px var(--accent-glow);
}



.image-placeholder {
    width: 100%;
    height: 200px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-small);
}

/* Insert user image support */
.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom,
        rgba(0, 255, 65, 0) 0%,
        rgba(0, 255, 65, 0.05) 50%,
        rgba(0, 255, 65, 0) 100%
    );
    animation: scan 4s linear infinite;
    pointer-events: none;
    z-index: 3;
}

@keyframes scan {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(50%); }
}

.placeholder-text {
    text-align: center;
    font-family: var(--font-heading);
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.placeholder-text .sub-text {
    font-size: 0.8rem;
    font-family: var(--font-body);
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid;
    margin-bottom: 1rem;
}

.online-soon {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(0, 255, 65, 0.1);
}

.pending {
    color: #ffbd2e;
    border-color: #ffbd2e;
    background: rgba(255, 189, 46, 0.1);
}

.pulse-status {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 255, 65, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 65, 0); }
}

.description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Unconfirmed/Pending server style */
.unconfirmed .server-title::before {
    color: #ffbd2e;
}
.unconfirmed:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 40px var(--accent-glow-red);
}
.unconfirmed .card-border-top {
    background: var(--accent-secondary);
    box-shadow: 0 0 15px var(--accent-secondary);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1100px) {
    .layout-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        order: 2; /* Move sidebars below content on smaller screens */
    }
    .container {
        order: 1;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .layout-wrapper {
        padding: 1rem;
        gap: 2rem;
    }

    .lang-switch {
        top: 1rem;
        right: 1rem;
    }
    
    .panel-content {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
    }
}
