/*
 * VENTERUM UI-KIT
 * A reusable, themeable component library.
 */

/* ==========================================================================
   1. CORE & THEME DEFINITIONS
   ========================================================================== */

:root {
    /* Default Theme: Pale Garden */
    --bg-color: #1a1a1a;
    --text-color: #d1d1d1;
    --text-color-muted: #8a8a8a;
    --accent-color: #8a8a8a;
    --accent-color-translucent: rgba(138, 138, 138, 0.2);

    --surface-0: rgba(138, 138, 138, 0.02);
    --surface-1: rgba(138, 138, 138, 0.05);
    --surface-2: rgba(138, 138, 138, 0.08);
    
    --terminal-bg: rgba(26, 26, 26, 0.95);
    
    --elevation-1: 0 2px 4px rgba(0, 0, 0, 0.2);
    --elevation-2: 0 4px 8px rgba(0, 0, 0, 0.25);
    
    --radius-1: 16px;
    --radius-2: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Specific Component Colors */
    --color-red: #ff5f57;
    --color-green: #44b544;
    --color-blue: #4d9fff;
    --color-orange: #fd971f;
}

.theme-light {
    --bg-color: #f5f5f5;
    --text-color: #333333;
    --text-color-muted: #777777;
    --accent-color: #555555;
    --accent-color-translucent: rgba(85, 85, 85, 0.2);
    --surface-0: #ffffff;
    --surface-1: rgba(85, 85, 85, 0.05);
    --surface-2: rgba(85, 85, 85, 0.08);
    --terminal-bg: rgba(245, 245, 245, 0.95);
}

.theme-mint {
    --bg-color: #e8f5e9;
    --text-color: #1a332a;
    --text-color-muted: #5a7d6a;
    --accent-color: #8bc34a;
    --accent-color-translucent: rgba(139, 195, 74, 0.2);
    --surface-0: #f1f8f2;
    --surface-1: rgba(139, 195, 74, 0.08);
    --surface-2: rgba(139, 195, 74, 0.12);
    --terminal-bg: rgba(232, 245, 233, 0.95);
}

.theme-tokyo {
    --bg-color: #1a1b26;
    --text-color: #a9b1d6;
    --text-color-muted: #5a5b72;
    --accent-color: #7aa2f7;
    --accent-color-translucent: rgba(122, 162, 247, 0.2);
    --surface-0: #1f202e;
    --surface-1: rgba(122, 162, 247, 0.05);
    --surface-2: rgba(122, 162, 247, 0.08);
    --terminal-bg: rgba(26, 27, 38, 0.95);
}

.theme-coral {
    --bg-color: #1e1414;
    --text-color: #e4c7c7;
    --text-color-muted: #a48787;
    --accent-color: #ff7b7b;
    --accent-color-translucent: rgba(255, 123, 123, 0.2);
    --surface-0: #281e1e;
    --surface-1: rgba(255, 123, 123, 0.05);
    --surface-2: rgba(255, 123, 123, 0.08);
    --terminal-bg: rgba(30, 20, 20, 0.95);
}

.theme-sage {
    --bg-color: #141e17;
    --text-color: #c7e4d4;
    --text-color-muted: #87a494;
    --accent-color: #7bffa7;
    --accent-color-translucent: rgba(123, 255, 167, 0.2);
    --surface-0: #1e2821;
    --surface-1: rgba(123, 255, 167, 0.05);
    --surface-2: rgba(123, 255, 167, 0.08);
    --terminal-bg: rgba(20, 30, 23, 0.95);
}

.theme-azure {
    --bg-color: #14191e;
    --text-color: #c7d9e4;
    --text-color-muted: #8799a4;
    --accent-color: #7bc4ff;
    --accent-color-translucent: rgba(123, 196, 255, 0.2);
    --surface-0: #1e2328;
    --surface-1: rgba(123, 196, 255, 0.05);
    --surface-2: rgba(123, 196, 255, 0.08);
    --terminal-bg: rgba(20, 25, 30, 0.95);
}

/* Retro theme for kernel_panic styles */
.theme-hacker {
    --bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-color-muted: #aaa;
    --accent-color: #00ff00;
    --accent-color-translucent: rgba(0, 255, 0, 0.2);
    --surface-0: #333;
    --surface-1: #444;
    --surface-2: #555;
    --terminal-bg: #1e1e1e;
}

/* ==========================================================================
   2. BASE & TYPOGRAPHY
   ========================================================================== */

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'IBM Plex Mono', monospace;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--accent-color);
    font-weight: 700;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

.highlight-link {
    color: var(--accent-color);
    font-weight: bold;
    position: relative;
}

.highlight-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.highlight-link:hover::after {
    transform: scaleX(1);
}

pre, code {
    font-family: 'IBM Plex Mono', monospace;
    background-color: var(--surface-1);
    padding: 2px 4px;
    border-radius: 4px;
}

pre {
    padding: 1rem;
    border-radius: var(--radius-1);
    border: 1px solid var(--surface-2);
    white-space: pre-wrap;
    word-break: break-all;
}

/* ==========================================================================
   3. COMPONENTS
   ========================================================================== */

/* -------------------- Buttons -------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-1);
    background: var(--accent-color);
    color: var(--bg-color);
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--elevation-1);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 9999px;
    transition: var(--transition);
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--elevation-1);
}

.nav-button:hover {
    transform: translateY(-4px);
    box-shadow: var(--elevation-2);
    background: var(--surface-2);
    color: var(--accent-color);
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    opacity: 0.7;
}

.control-btn:hover {
    opacity: 1;
}

.control-btn.red:hover {
    color: var(--color-red);
}

/* -------------------- Cards & Containers -------------------- */

.card {
    background: var(--surface-1);
    border-radius: var(--radius-2);
    box-shadow: var(--elevation-1);
    border: 1px solid var(--surface-2);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--elevation-2);
    background: var(--surface-2);
}

.card-header {
    color: var(--accent-color);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--surface-2);
}

.card-header h2, .card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.terminal {
    background: var(--terminal-bg);
    border-radius: var(--radius-2);
    box-shadow: var(--elevation-2);
    backdrop-filter: blur(10px);
    border: 1px solid var(--surface-2);
    margin: 2rem auto;
    max-width: 840px;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

.terminal-header {
    background: var(--surface-1);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-content {
    padding: 1.5rem;
    font-family: 'IBM Plex Mono', monospace;
}

/* -------------------- Forms & Inputs -------------------- */

.input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-1);
    background: var(--surface-0);
    color: var(--text-color);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1em;
    transition: var(--transition);
    box-sizing: border-box;
}

.input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color-translucent);
}

textarea.input {
    resize: vertical;
    min-height: 120px;
}

/* -------------------- Notifications -------------------- */

.notice-banner {
    background: var(--terminal-bg);
    border: 1px solid var(--accent-color);
    border-radius: var(--radius-1);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--elevation-2);
    max-width: 550px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: bold;
}

.notice-text {
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.notice-buttons {
    display: flex;
    justify-content: flex-end;
}

/* -------------------- Tags -------------------- */

.tag {
    background: var(--surface-2);
    color: var(--accent-color);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.8rem;
    transition: var(--transition);
    display: inline-block;
}

.tag:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* -------------------- Tooltip -------------------- */

.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--surface-2);
    color: var(--text-color);
    padding: 1rem;
    border-radius: var(--radius-1);
    box-shadow: var(--elevation-2);
    width: 250px;
    z-index: 10;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tooltip-wrapper:hover .tooltip {
    display: block;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--surface-2) transparent transparent transparent;
}

/* -------------------- Navbar -------------------- */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    animation: fadeIn 0.5s ease-out;
}

.navbar-logo {
    font-weight: 700;
    font-size: 1.2rem;
}

.navbar-buttons {
    display: flex;
    gap: 1rem;
}

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-1);
    padding: 0.5rem;
    border-radius: 99999px;
    border: 1px solid var(--surface-2);
}

/* ==========================================================================
   4. RETRO COMPONENTS (Hacker Theme)
   ========================================================================== */

.theme-hacker .forum-table {
    background-color: var(--surface-0);
    border-collapse: collapse;
    width: 100%;
    border: 1px solid var(--accent-color);
}

.theme-hacker .forum-table th {
    background-color: var(--surface-2);
    color: var(--accent-color);
    text-align: left;
}

.theme-hacker .forum-table td, .theme-hacker .forum-table th {
    border: 1px solid var(--accent-color);
    padding: 8px;
}

.theme-hacker .forum-table a {
    color: var(--accent-color);
    font-weight: bold;
}

.theme-hacker .forum-table span {
    color: var(--text-color-muted);
    font-size: 10px;
}

.theme-hacker .retro-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 3px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
    border: 1px solid var(--accent-color);
    cursor: pointer;
}

.theme-hacker .retro-button:hover {
    background-color: var(--bg-color);
    color: var(--accent-color);
}

/* ==========================================================================
   5. UTILITIES & HELPERS
   ========================================================================== */

.grid-container-2-col {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 24px;
}

@media (min-width: 768px) {
    .grid-container-2-col {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   6. RESPONSIVE & MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-buttons {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-button > span {
        display: none;
    }

    .nav-button i {
        font-size: 1.4rem;
        margin: 0;
    }

    .nav-button {
        width: 60px;
        height: 60px;
        border-radius: var(--radius-1);
        flex-direction: column;
        font-size: 0.85rem;
    }

    .navbar-controls {
        width: 100%;
        justify-content: center;
    }
}