:root {
    --text-primary: #171717; /* Deep neutral dark */
    --text-secondary: #525252; /* Neutral gray */
    --bg-color: #fafafa; /* Very light, warm neutral gray (almost white) */
    --card-bg: #ffffff;
    --code-bg: #f5f5f5; /* Matching neutral tone for code block */
    --primary-blue: #0ea5e9;
    --btn-black: #171717;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Background Glows */
.bg-glow {
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(150px); /* Increased blur for smoother blending */
    z-index: 0;
    opacity: 0.45; /* Lowered opacity for a subtler effect */
    pointer-events: none;
}

.glow-left {
    background: radial-gradient(circle, rgba(20, 184, 166, 0.4) 0%, rgba(20, 184, 166, 0) 70%); /* Soft teal/cyan */
    top: -10%;
    left: -20%;
}

.glow-right {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0) 70%); /* Soft warm amber/orange */
    bottom: -10%;
    right: -20%;
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    min-height: calc(100vh - 53px);
    margin: 0 auto;
    padding: 1rem 2rem 0;
}

/* Titles */
.header-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.logo-icon {
    width: 24px;
    height: 24px;
}

.divider {
    color: #cbd5e1;
    font-weight: 300;
    margin: 0 0.25rem;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Card */
.card {
    background: var(--card-bg);
    border-radius: 28px;
    padding: 2.2rem 2.8rem 1.5rem;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 2rem;
}

/* Code Section & Tabs */
.code-section {
    margin-bottom: 2rem;
}

.os-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.os-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.os-tab:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.os-tab.active {
    color: #06b6d4; /* Matching the cyan copy button */
    background: rgba(6, 182, 212, 0.1);
}

/* Code Container */
.code-container {
    background: var(--code-bg);
    border-radius: 16px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-text {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1.15rem;
}

.code-text .cmd {
    color: #06b6d4; /* A slightly greener blue to match typical themes */
}

.code-text .upd {
    color: #BA8E00; /* A soft orange to distinguish the upgrade flag */
}

.code-text .pkg {
    color: #111827;
}

.copy-btn {
    background: rgba(6, 182, 212, 0.7); /* Matching the pip install cyan blue color */
    color: #ffffff; 
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
}

.copy-btn:hover {
    background: #0891b2; /* Slightly darker cyan on hover */
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
    transform: translateY(-1px);
}

/* List */
.feature-list {
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.feature-list li:last-child {
    margin-bottom: 0;
}

.feature-list a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 400;
    transition: color 0.2s;
}

.feature-list a:hover {
    color: var(--text-primary);
}

/* CTA Button */
.cta-btn {
    background-color: var(--btn-black);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 0.8rem 2rem;
    min-height: 56px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-btn:hover {
    background-color: #374151;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.cta-btn:active {
    transform: translateY(0);
}

.key-panel {
    width: 100%;
    max-width: 700px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
}

.api-key-box {
    width: 100%;
    background: var(--code-bg);
    border-radius: 16px;
    min-height: 56px;
    padding: 0.35rem 0.5rem 0.35rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.api-key-code {
    display: block;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.98rem;
    color: var(--text-primary);
}

.api-key-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.key-action-btn {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid rgba(23, 23, 23, 0.08);
    border-radius: 12px;
    height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.key-action-copy {
    min-width: 90px;
    justify-content: center;
    background: rgba(6, 182, 212, 0.7);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
}

.key-action-copy:hover {
    background: #0891b2;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}

.key-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.key-action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.key-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.42);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 2200;
}

.key-modal-overlay.open {
    display: flex;
}

.key-modal {
    width: min(100%, 420px);
    background: #ffffff;
    border-radius: 22px;
    padding: 1.35rem 1.35rem 1.15rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.16);
}

.key-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
    color: var(--text-primary);
}

.key-modal-text {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.key-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
}

.key-modal-btn {
    border: none;
    border-radius: 12px;
    padding: 0.78rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.key-modal-cancel {
    background: #f3f4f6;
    color: var(--text-primary);
}

.key-modal-confirm {
    background: var(--btn-black);
    color: #ffffff;
}

.key-modal-btn:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .container {
        min-height: auto;
        padding: 0.5rem 1rem 1.35rem;
    }

    .main-title {
        font-size: 1.95rem;
    }
    .card {
        padding: 1.35rem;
        border-radius: 20px;
    }
    .code-container {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 1rem;
    }
    .copy-btn {
        width: 100%;
    }
    .api-key-box {
        flex-direction: column;
        align-items: stretch;
    }
    .api-key-actions {
        width: 100%;
    }
    .key-action-btn {
        flex: 1 1 0;
    }
}
