/* 
 * ZECRETZONE.GG - Fluent Design System 
 * Inspired by Windows 11 & High-End Tech Aesthetics
 */

:root {
    --bg-mica: #1e1e1e;
    /* Mica base */
    --bg-acrylic: rgba(32, 32, 32, 0.6);
    /* Acrylic transparency */
    --surface-card: rgba(255, 255, 255, 0.05);
    /* Subtle card bg */
    --surface-hover: rgba(255, 255, 255, 0.08);

    --primary: #6366f1;
    /* Blurple */
    --accent: #10b981;
    /* Success Green */
    --danger: #ef4444;
    /* Error Red */
    --warning: #f59e0b;

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    --font-stack: 'Segoe UI Variable', 'Inter', sans-serif;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.4);

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #000;
    color: var(--text-primary);
    font-family: var(--font-stack);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- 0. GOD TIER BOOT SCREEN --- */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Fira Code', monospace;
    transition: opacity 0.5s ease-out;
}

.boot-terminal {
    width: 600px;
    margin-bottom: 2rem;
}

.boot-line {
    color: #444;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0;
    /* JS handles this */
}

.boot-line.success {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.boot-line.glitch {
    animation: glitchText 0.3s infinite;
    color: var(--primary);
}

.boot-progress {
    width: 600px;
    height: 4px;
    background: #111;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.boot-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary);
    transition: width 2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- GLITCH FX --- */
@keyframes glitchText {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

/* Background Canvas */
canvas#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Scrollbar (App like) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    background: rgba(20, 20, 20, 0.85);
    /* Slightly transparent container */
    backdrop-filter: blur(20px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- CRT SCANLINES --- */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
}

/* Sidebar */
.sidebar {
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: width 0.3s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.15);
    /* Primary tint */
    color: var(--primary);
    border-left: 3px solid var(--primary);
    /* Fluent active strip */
}

.nav-link i {
    width: 20px;
}

/* Main Content Area */
.main-content {
    padding: 32px 40px;
    overflow-y: auto;
    position: relative;
}

.page-section {
    display: none;
    /* Hidden by default for SPA */
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-smooth);
}

.page-section.active {
    display: block;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Headers */
.section-header {
    margin-bottom: 40px;
}

.section-header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.info-card {
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-fast);
}

.info-card:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 12px 0 4px;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Product Cards (Box Style) */
.product-card {
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    /* For uniform height in grid */
    position: relative;
    transition: var(--transition-fast);
}

.product-card:hover {
    background: var(--surface-hover);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
    transform: translateY(-4px);
}

/* Header: Icon + Status */
.p-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 8px;
}

.p-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.p-status {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.p-status.online {
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
}

.p-status.offline {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.p-status.maintenance {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

/* Content: Title + Version */
.p-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.p-version {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

/* Features List */
.p-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.p-features span {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Footer: Price + Button */
.p-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    /* Push to bottom */
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
}

.p-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-sm:hover {
    background: #4f46e5;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

/* Status Table */
.status-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: var(--surface-card);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    align-items: center;
    border: 1px solid transparent;
}

.status-row:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--surface-hover);
}

/* Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-dot.online {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.status-dot.offline {
    background: var(--danger);
}

.status-dot.maintenance {
    background: var(--warning);
}

/* Custom Cursor */
.custom-cursor {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.cursor-follower {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s;
}

.cursor-follower.active {
    transform: scale(2);
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* Notification Toast */
#notification-area {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: var(--radius-md);
    width: 300px;
    display: flex;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 3px solid var(--accent);
}

.notification.error {
    border-left: 3px solid var(--danger);
}

.notification.info {
    border-left: 3px solid var(--primary);
}

.n-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.n-msg {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 80px 1fr;
        /* Collapsed sidebar */
    }

    .brand span,
    .nav-link span {
        display: none;
    }

    /* Hide text */
    .nav-link {
        justify-content: center;
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .app-container {
        display: block;
        height: auto;
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0;
        z-index: 100;
        background: #111;
        border-top: 1px solid #333;
    }

    .nav-menu {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
        align-items: center;
    }

    .nav-link {
        flex-direction: column;
        gap: 4px;
        font-size: 0.7rem;
        padding: 8px;
    }

    .nav-link i {
        width: 18px;
    }

    .brand {
        display: none;
    }

    .main-content {
        padding: 20px 20px 80px;
    }

    .product-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-card .p-icon {
        margin: 0 auto;
    }
}