/* ================================================
   NYX-OFF.DEV - Main Stylesheet
   Theme: Dark Hacker Terminal
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --accent-primary: #dc143c;
    --accent-secondary: #8b0000;
    --accent-glow: rgba(220, 20, 60, 0.3);
    --text-primary: #e0e0e0;
    --text-secondary: #808080;
    --text-muted: #505050;
    --border-color: #2a2a2a;
    --font-mono: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* ---- Background Grid Effect ---- */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(220, 20, 60, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 20, 60, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

.bg-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

/* ---- Main Container ---- */
.main-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* ---- Header Section ---- */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header__prefix {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.header__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    position: relative;
    display: inline-block;
}

.header__title::before {
    content: '>';
    position: absolute;
    left: -1.5em;
    color: var(--text-muted);
    animation: blink 1s infinite;
}

.header__subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-weight: 300;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ---- Terminal Window ---- */
.terminal {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100%;
    max-width: 700px;
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.5),
        0 0 1px var(--accent-glow);
}

.terminal__header {
    background-color: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.terminal__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-muted);
}

.terminal__dot--red { background-color: #ff5f56; }
.terminal__dot--yellow { background-color: #ffbd2e; }
.terminal__dot--green { background-color: #27ca40; }

.terminal__title {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.terminal__body {
    padding: 1.5rem;
}

/* ---- Navigation Links ---- */
.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nav-item:hover {
    background-color: var(--bg-tertiary);
}

.nav-item:hover .nav-item__name {
    color: var(--accent-primary);
}

.nav-item:hover .nav-item__arrow {
    opacity: 1;
    transform: translateX(0);
}

.nav-item__index {
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 2rem;
    flex-shrink: 0;
}

.nav-item__name {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.nav-item__desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 1rem;
    display: none;
}

.nav-item__arrow {
    font-size: 0.85rem;
    color: var(--accent-primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

@media (min-width: 600px) {
    .nav-item__desc {
        display: block;
    }
}

/* ---- Command Line ---- */
.terminal__prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.prompt__user {
    color: var(--accent-primary);
    font-size: 0.85rem;
}

.prompt__path {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.prompt__cursor {
    width: 8px;
    height: 16px;
    background-color: var(--accent-primary);
    animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ---- Footer ---- */
.footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer__link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ---- Status Indicator ---- */
.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.status__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #27ca40;
    box-shadow: 0 0 6px #27ca40;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .main-container {
        padding: 1rem;
    }

    .terminal__body {
        padding: 1rem;
    }

    .nav-item {
        padding: 0.6rem 0.75rem;
    }
}

/* ---- Selection ---- */
::selection {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
