/**
 * DropSomewhere - Modern Console Design
 * Minimal, technical aesthetic with white color tone
 */

/* ====== RESET & BASE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:        #ffffff;
    --bg-alt:    #f5f5f5;
    --bg-hover:  #eaeaea;
    --border:    #e0e0e0;
    --border-dark:#cccccc;
    --text:      #1a1a1a;
    --text-dim:  #757575;
    --text-bright:#ffffff;
    --accent:    #0066ff;
    --accent-hover:#0052cc;
    --accent-light:#e8f0fe;
    --success:   #00875a;
    --warning:   #ff991f;
    --danger:    #de350b;
    --mono:      'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    --sans:      -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    --radius:    6px;
    --shadow:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

@font-face {
    font-family: 'JetBrains Mono';
    src: local('JetBrains Mono'), local('SF Mono');
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====== LAYOUT ====== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====== NAVBAR ====== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-brand span {
    color: var(--accent);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.navbar-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.navbar-links a:hover {
    color: var(--text);
}

/* ====== HERO ====== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-logo {
    font-size: 3rem;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: var(--mono);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -2px;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero p {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    margin: 48px auto 0;
    max-width: 600px;
    width: 100%;
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* ====== BUTTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    background: var(--bg);
    color: var(--text);
}

.btn:hover {
    background: var(--bg-alt);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--accent);
    color: var(--text-bright);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-icon {
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-dim);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.btn-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* ====== SECTIONS ====== */
.section {
    padding: 64px 0;
    border-top: 1px solid var(--border);
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ====== FEATURES GRID ====== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-dark);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ====== HOW TO USE ====== */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    counter-reset: step;
}

.step {
    padding: 32px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    position: relative;
    counter-increment: step;
}

.step::before {
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: var(--text-bright);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 16px;
}

.step h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.step p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ====== CODE BLOCK ====== */
.code-block {
    background: #1a1a1a;
    color: #e0e0e0;
    border-radius: var(--radius);
    padding: 20px 24px;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.7;
    overflow-x: auto;
    position: relative;
    margin: 16px 0;
}

.code-block .comment {
    color: #6a9955;
}

.code-block .keyword {
    color: #569cd6;
}

.code-block .string {
    color: #ce9178;
}

.code-block .function {
    color: #dcdcaa;
}

.code-block .prompt {
    color: #6a9955;
    user-select: none;
}

.code-block .cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--accent);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

.code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.code-copy {
    background: none;
    border: 1px solid #444;
    color: #999;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--mono);
    transition: all 0.2s;
}

.code-copy:hover {
    border-color: #888;
    color: #ccc;
}

/* ====== DOWNLOAD SECTION ====== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.download-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.download-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.download-info h3 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.download-info p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ====== TERMINAL ====== */
.terminal {
    background: #1a1a1a;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
    box-shadow: var(--shadow-lg);
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #2d2d2d;
    gap: 8px;
}

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
    color: #888;
    font-size: 0.75rem;
    margin-left: 8px;
}

.terminal-body {
    padding: 20px;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #e0e0e0;
}

/* ====== FOOTER ====== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ====== STATUS & UTILITIES ====== */
.status-bar {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--accent);
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .navbar-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
}

/* ====== DOWNLOADS SECTION ====== */
#downloads {
    border-top: 2px solid var(--accent);
    background: var(--bg);
}

.download-banner {
    text-align: center;
    padding: 80px 0 40px;
}

.download-banner .tag {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.download-banner h2 {
    font-family: var(--mono);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
}

.download-banner p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* Auto-detect bar */
.auto-detect-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    margin: 24px auto;
    max-width: 700px;
    font-size: 0.85rem;
}

.auto-detect-bar .detected {
    font-weight: 700;
    color: var(--accent);
}

.auto-detect-bar .btn {
    padding: 6px 16px;
    font-size: 0.8rem;
    margin-left: auto;
}

/* Version selector */
.version-selector {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 32px 0 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.version-btn {
    padding: 8px 20px;
    border: none;
    background: none;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.version-btn:hover {
    color: var(--text);
}

.version-btn.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow);
}

.version-badge {
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.version-badge.stable { background: #e6f7ed; color: #00875a; }
.version-badge.latest { background: var(--accent-light); color: var(--accent); }
.version-badge.nightly { background: #fff3e0; color: #e65100; }

/* Download grid - per OS */
.os-downloads {
    margin: 24px 0;
}

.os-section {
    margin-bottom: 40px;
}

.os-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.os-section-header .os-icon {
    width: 32px;
    height: 32px;
}

.os-section-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.os-section-header .detected-tag {
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    display: none;
}

.os-section-header .detected-tag.show {
    display: inline-block;
}

.download-table {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.download-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 80px;
    padding: 10px 16px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 80px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    align-items: center;
    transition: background 0.15s;
}

.download-row:last-child {
    border-bottom: none;
}

.download-row:hover {
    background: var(--bg-alt);
}

.download-row .filename {
    font-weight: 600;
    font-family: var(--mono);
}

.download-row .arch {
    color: var(--text-dim);
    font-size: 0.78rem;
}

.download-row .size {
    color: var(--text-dim);
    font-size: 0.78rem;
}

.download-row .format {
    font-size: 0.75rem;
    color: var(--text-dim);
    background: var(--bg-alt);
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
    text-align: center;
}

.download-row .download-btn {
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s;
}

.download-row .download-btn:hover {
    background: var(--accent-hover);
}

/* Checksum toggle */
.checksum-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-size: 0.78rem;
    cursor: pointer;
    margin-top: 12px;
    transition: color 0.2s;
}

.checksum-toggle:hover {
    color: var(--text);
}

.checksum-list {
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 0.75rem;
    line-height: 1.8;
    color: var(--text-dim);
    background: var(--bg-alt);
    padding: 16px;
    border-radius: var(--radius);
    display: none;
}

.checksum-list.show {
    display: block;
}

.checksum-list code {
    display: block;
    word-break: break-all;
    padding: 2px 0;
}

.checksum-list .hash {
    color: var(--accent);
}

/* Package manager section */
.pkg-managers {
    margin-top: 48px;
}

.pkg-managers h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.pkg-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--bg);
    transition: all 0.2s;
}

.pkg-card:hover {
    border-color: var(--border-dark);
    box-shadow: var(--shadow);
}

.pkg-card .pkg-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pkg-card .pkg-icon {
    width: 18px;
    height: 18px;
}

.pkg-card .pkg-cmd {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pkg-card .pkg-cmd code {
    color: #27ca40;
}

.pkg-card .pkg-cmd button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: var(--mono);
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.pkg-card .pkg-cmd button:hover {
    background: #333;
    color: #ccc;
}

/* Quick install */
.quick-install {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px 0;
    text-align: center;
}

.quick-install p {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

/* Responsive downloads */
@media (max-width: 768px) {
    .download-table-header,
    .download-row {
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
    }

    .download-table-header .arch,
    .download-table-header .size,
    .download-table-header .format {
        display: none;
    }

    .download-row .arch,
    .download-row .size,
    .download-row .format {
        display: none;
    }

    .download-row .filename {
        grid-column: 1;
    }

    .download-row .download-btn {
        grid-column: 2;
        justify-self: end;
    }

    .pkg-grid {
        grid-template-columns: 1fr;
    }

    .download-banner h2 {
        font-size: 1.6rem;
    }

    .auto-detect-bar {
        flex-wrap: wrap;
    }

    .auto-detect-bar .btn {
        margin-left: 0;
    }
}

/* ====== ANIMATIONS ====== */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

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

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

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