/* ==========================================================================
   epta Coming Soon — IDE / Code Editor Theme
   ========================================================================== */

:root {
    /* VS Code Dark+ inspired palette */
    --bg-editor: #1e1e2e;
    --bg-sidebar: #181825;
    --bg-titlebar: #11111b;
    --bg-terminal: #11111b;
    --bg-statusbar: #181825;
    --bg-line-highlight: rgba(0, 240, 255, 0.04);
    --bg-active-tab: #1e1e2e;
    --bg-inactive-tab: #14141f;

    --color-primary: #00f0ff;     /* Neon Cyan */
    --color-secondary: #c678dd;   /* Purple (keywords) */
    --color-green: #98c379;       /* Strings */
    --color-orange: #e5c07b;      /* Properties */
    --color-blue: #61afef;        /* Functions */
    --color-red: #e06c75;         /* Variables */
    --color-comment: #5c6370;     /* Comments */
    --color-number: #d19a66;      /* Numbers */
    --color-class: #e5c07b;       /* Classes */

    --text-primary: #cdd6f4;
    --text-secondary: #a6adc8;
    --text-muted: #585b70;
    --line-number-color: #45475a;

    --border-color: rgba(255, 255, 255, 0.06);

    /* Fonts */
    --font-code: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    height: 100%;
}

body {
    font-family: var(--font-code);
    background-color: #0b0b14;
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    padding: 1.5rem;
}

/* ==========================================================================
   Background Canvas
   ========================================================================== */

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: all;
    opacity: 0.4;
}

/* ==========================================================================
   IDE Window Frame
   ========================================================================== */

.ide-window {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1000px;
    height: calc(100vh - 3rem);
    max-height: 700px;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(0, 240, 255, 0.04);
    animation: windowAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   Title Bar
   ========================================================================== */

.ide-titlebar {
    display: flex;
    align-items: center;
    background: var(--bg-titlebar);
    height: 38px;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-shrink: 0;
    -webkit-app-region: drag;
}

.window-controls {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.dot-red { background: #f38ba8; }
.dot-yellow { background: #f9e2af; }
.dot-green { background: #a6e3a1; }

.titlebar-tabs {
    display: flex;
    gap: 0;
    margin-left: 1rem;
    flex: 1;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 1rem;
    height: 38px;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-inactive-tab);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab.active {
    color: var(--text-primary);
    background: var(--bg-active-tab);
    border-bottom: 2px solid var(--color-primary);
}

.tab:hover:not(.active) {
    color: var(--text-secondary);
}

.titlebar-actions {
    flex-shrink: 0;
}

.branch-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==========================================================================
   IDE Body (Sidebar + Editor)
   ========================================================================== */

.ide-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Activity Sidebar */
.ide-sidebar {
    width: 48px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.75rem;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sidebar-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-icon.active {
    color: var(--color-primary);
}

.sidebar-icon.active::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 20px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* ==========================================================================
   Code Editor
   ========================================================================== */

.ide-editor {
    flex: 1;
    background: var(--bg-editor);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

.code-block {
    display: flex;
    flex-direction: column;
}

.code-line {
    display: flex;
    align-items: center;
    padding: 0 1.25rem 0 0;
    min-height: 1.65rem;
    transition: background 0.15s ease;
}

.code-line:hover {
    background: rgba(255, 255, 255, 0.015);
}

.code-line.highlight-line {
    background: var(--bg-line-highlight);
    border-left: 2px solid var(--color-primary);
}

.line-number {
    width: 3.5rem;
    text-align: right;
    padding-right: 1.25rem;
    color: var(--line-number-color);
    font-size: 0.82rem;
    user-select: none;
    flex-shrink: 0;
}

.highlight-line .line-number {
    color: var(--color-primary);
    opacity: 0.7;
}

.line-content {
    font-size: 0.88rem;
    line-height: 1.65;
    white-space: pre;
    letter-spacing: 0.01em;
}

/* Syntax Tokens */
.token-keyword { color: var(--color-secondary); font-weight: 500; }
.token-string { color: var(--color-green); }
.token-variable { color: var(--color-red); }
.token-property { color: var(--color-orange); }
.token-function { color: var(--color-blue); }
.token-comment { color: var(--color-comment); font-style: italic; }
.token-number { color: var(--color-number); }
.token-class { color: var(--color-class); }

/* Countdown number values pulse */
.token-number {
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* ==========================================================================
   Terminal Panel
   ========================================================================== */

.ide-terminal {
    background: var(--bg-terminal);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    height: 32px;
    border-bottom: 1px solid var(--border-color);
}

.terminal-tabs {
    display: flex;
    gap: 0;
}

.terminal-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 0.75rem;
    height: 32px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.terminal-tab.active {
    color: var(--text-primary);
    border-bottom: 1px solid var(--color-primary);
}

.terminal-body {
    padding: 0.75rem 1rem 0.75rem 1rem;
    font-size: 0.82rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 100px;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.terminal-prompt {
    color: var(--color-primary);
    font-weight: 600;
}

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

.terminal-path {
    color: var(--color-blue);
}

.terminal-dollar {
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.terminal-typed {
    color: var(--text-primary);
}

.terminal-cursor {
    color: var(--color-primary);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

.terminal-static-cmd {
    color: var(--text-secondary);
}

.terminal-result {
    color: var(--color-green);
    padding-left: 0.25rem;
}

/* Terminal Input for Subscribe */
.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-green);
    font-family: var(--font-code);
    font-size: 0.82rem;
    flex: 1;
    min-width: 120px;
    caret-color: var(--color-primary);
}

.terminal-input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.terminal-submit {
    background: transparent;
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: var(--color-primary);
    cursor: pointer;
    border-radius: 3px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.terminal-submit:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.terminal-feedback {
    padding-left: 0.25rem;
    font-size: 0.82rem;
}

.terminal-feedback.success {
    color: var(--color-green);
}

.terminal-feedback.error {
    color: var(--color-red);
}

/* Email Copy Badge */
.email-badge {
    color: var(--color-primary);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.15);
    transition: all 0.2s ease;
    user-select: none;
    outline: none;
    font-weight: 500;
}

.email-badge:hover, .email-badge:focus-visible {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.copy-toast {
    color: var(--color-green);
    font-size: 0.75rem;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-toast.visible {
    opacity: 1;
}

/* ==========================================================================
   Status Bar
   ========================================================================== */

.ide-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-statusbar);
    height: 24px;
    padding: 0 0.75rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.statusbar-left, .statusbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-ui);
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.status-item.branch {
    color: var(--color-primary);
}

.status-item.powered {
    color: var(--color-primary);
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--color-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-green);
}

/* ==========================================================================
   Keyframes
   ========================================================================== */

@keyframes blink {
    50% { opacity: 0; }
}

@keyframes windowAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

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

    .ide-window {
        border-radius: 0;
        height: 100vh;
        max-height: none;
        border: none;
    }

    .ide-sidebar {
        display: none;
    }

    .titlebar-actions {
        display: none;
    }

    .titlebar-tabs .tab:not(.active) {
        display: none;
    }

    .code-line {
        padding-right: 0.5rem;
    }

    .line-number {
        width: 2.5rem;
        padding-right: 0.75rem;
        font-size: 0.72rem;
    }

    .line-content {
        font-size: 0.78rem;
    }

    .terminal-body {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .status-item:not(.branch):not(.powered) {
        display: none;
    }
}

@media (max-width: 480px) {
    .line-content {
        font-size: 0.72rem;
    }

    .terminal-body {
        font-size: 0.7rem;
        min-height: 80px;
    }
}
