:root {
    --bg-dark: #050505;
    --panel-bg: #0a0a0a;
    --border-color: #333;
    --accent-primary: #00ff9d;
    /* Cyber Green */
    --accent-dim: rgba(0, 255, 157, 0.1);
    --text-primary: #fff;
    --text-muted: #666;

    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --sidebar-width: 350px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-display);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
}

.screen {
    display: flex;
    width: 100%;
    height: 100%;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 5px var(--accent-primary));
}

.brand-text h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    margin: 0;
}

.brand-text p {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    margin: 5px 0 0 0;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.tool-item {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.tool-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.tool-item.active {
    color: #000;
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    font-weight: 700;
    box-shadow: 0 0 15px var(--accent-dim);
}

/* Active Icon Color Logic */
.tool-item.active .item-icon {
    /* Since text is black, icon is black automatically */
}

.status-bar {
    margin-top: auto;
    padding-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-primary);
    animation: pulse 2s infinite;
}

/* --- Hero Stage --- */
.hero-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 600px;
    text-align: center;
    padding: 2rem;
}

.hero-content.fade-in {
    animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-icon-large {
    font-size: 5rem;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}

#hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.divider {
    height: 2px;
    width: 60px;
    background: var(--accent-primary);
    margin: 0 auto 2rem auto;
    box-shadow: 0 0 10px var(--accent-primary);
}

#hero-desc {
    font-family: var(--font-mono);
    color: #888;
    line-height: 1.6;
    margin-bottom: 3rem;
    font-size: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cyber-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 3rem;
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
}

.cyber-btn:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 30px var(--accent-dim);
}

.cyber-btn.disabled {
    border-color: #333;
    color: #333;
    pointer-events: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Background Effects */
.bg-grid {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    opacity: 0.3;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 20;
    opacity: 0.3;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
        box-shadow: 0 0 5px var(--accent-primary);
    }

    50% {
        opacity: 0.4;
        box-shadow: 0 0 2px var(--accent-primary);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 5px var(--accent-primary);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    .screen {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }

    .brand {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .brand-text h1 {
        font-size: 1.2rem;
    }

    .tool-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 5px;
        gap: 0.5rem;
        /* Hide scrollbar but keep functionality */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .tool-list::-webkit-scrollbar {
        display: none;
    }

    .tool-item {
        flex: 0 0 auto;
        /* Don't shrink */
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid #333;
    }

    .tool-item .item-text {
        display: none;
        /* Icon only for space on super small screens, or keep text? Let's keep text for now but if issues arise, hide it. */
        display: inline;
    }

    .status-bar {
        display: none;
    }

    .hero-stage {
        padding: 1rem;
    }

    #hero-title {
        font-size: 2rem;
    }

    .hero-icon-large {
        font-size: 4rem;
    }

    #hero-desc {
        font-size: 0.9rem;
    }
}