:root {
    --primary-color: #1a1d23; /* Dark Navy/Black from logo */
    --accent-color: #f7e04a;  /* Yellow from logo dot */
    --bg-color: #f4f7f9;
    --card-bg: #ffffff;
    --text-color: #1a1d23;
    --text-muted: #5f6368;
    --border-color: #e0e4e8;
    --error-color: #d93025;
    --success-color: #188038;
    --btn-hover: #2d323a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    padding: 40px;
    border: 1px solid var(--border-color);
}

h1, h2, h3 {
    margin-top: 0;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.footer {
    text-align: center;
    padding: 80px 20px 60px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

.btn-danger {
    background-color: transparent;
    color: var(--error-color);
    border: 1px solid var(--border-color);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

form .form-group {
    margin-bottom: 24px;
}

form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

form input[type="text"],
form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.2s;
}

form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.5s ease-out;
    border-left: 4px solid transparent;
}

.alert-error {
    background-color: #fce8e6;
    color: #c5221f;
    border-left-color: #d93025;
}

.alert-success {
    background-color: #e6f4ea;
    color: #137333;
    border-left-color: #188038;
}

.nav {
    background: var(--card-bg);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 32px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-muted);
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.key-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.key-info code {
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
    color: var(--primary-color);
}

.key-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.new-key-box {
    background: #fff9db; /* Light yellow background */
    border: 1px solid #ffe066;
    padding: 24px;
    border-radius: 10px;
    margin-top: 24px;
}

.raw-key {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    word-break: break-all;
    display: block;
    margin: 16px 0;
    padding: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.raw-key:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.01);
}

.raw-key:active {
    transform: scale(0.99);
}

.raw-key::after {
    content: 'Click to copy';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.raw-key:hover::after {
    opacity: 1;
}

.raw-key.copied::after {
    content: 'Copied!';
    background: var(--success-color);
    opacity: 1;
}

/* Documentation specific styles */
.documentation h2 {
    margin-top: 48px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-color);
}
.documentation h3 {
    margin-top: 32px;
}
.documentation ul {
    padding-left: 20px;
}
.documentation li {
    margin-bottom: 12px;
}
.documentation blockquote {
    border-left: 4px solid var(--accent-color);
    margin: 24px 0;
    padding: 16px 24px;
    background: #fffbef;
    border-radius: 0 8px 8px 0;
}

.documentation pre {
    background: var(--primary-color);
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.documentation code {
    background: #f1f3f4;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
}

.documentation pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Snippet Modal & Code Blocks */
.snippet-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.tab-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.code-container {
    position: relative;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
}

.code-block {
    margin: 0;
    padding: 0;
    color: #d4d4d4;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

.copy-snippet-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}

.copy-snippet-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 29, 35, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--card-bg);
    width: 100%;
    max-width: 400px;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-title {
    font-size: 20px;
    margin-bottom: 12px;
}

.modal-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Terminal Console Styles */
.terminal-container {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
}

.terminal-log {
    height: 250px;
    overflow-y: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    padding: 10px;
    color: #e0e0e0;
    background: #000000;
    border-radius: 8px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.terminal-log::-webkit-scrollbar {
    width: 8px;
}

.terminal-log::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.terminal-line {
    margin-bottom: 4px;
    word-break: break-all;
}

.terminal-line.out { color: #4fc3f7; } /* Outgoing */
.terminal-line.in { color: #81c784; }  /* Incoming */
.terminal-line.system { color: #ffa726; font-weight: 600; } /* System messages */
.terminal-line.error { color: #e57373; font-weight: 600; }  /* Error messages */

.terminal-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.terminal-input-select {
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #2d2d2d;
    color: white;
    font-size: 13px;
    flex: 0 0 150px;
}

.terminal-input-text {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #2d2d2d;
    color: white;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    min-width: 200px;
}

.terminal-input-text:focus, .terminal-input-select:focus {
    outline: none;
    border-color: #007bff;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    color: var(--success-color);
}

.status-online .status-dot {
    background-color: var(--success-color);
    box-shadow: 0 0 0 0 rgba(24, 128, 56, 0.4);
    animation: pulse 2s infinite;
}

.status-offline {
    color: var(--text-muted);
}

.status-offline .status-dot {
    background-color: #9aa0a6;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(24, 128, 56, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(24, 128, 56, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(24, 128, 56, 0);
    }
}

/* Onboarding Stepper */
.onboarding-card {
    background: #ffffff;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.onboarding-card::before {
    content: 'QUICK START';
    position: absolute;
    top: 10px;
    right: -30px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 5px 40px;
    font-size: 10px;
    font-weight: 800;
    transform: rotate(45deg);
}

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    background: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--accent-color);
    transform: scale(1.2);
}

.step.completed {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

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

/* Usage Stats Cards */
.usage-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.usage-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.usage-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.usage-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Landing Page Specific Styles */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}
.hero-title {
    font-size: 64px;
    line-height: 1.05;
    margin-bottom: 24px;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: -0.04em;
}
.hero-title span {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}
.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 48px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.btn-lg {
    padding: 18px 40px;
    font-size: 16px;
    border-radius: 12px;
}
.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 80px 0;
}
.feature-card {
    padding: 40px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s;
}
.feature-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    transform: translateY(-8px);
}
.feature-card:hover::before {
    opacity: 1;
}
.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 700;
}
.feature-card p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.cta-section {
    margin: 120px 0;
}
.cta-card {
    text-align: center;
    background: var(--primary-color);
    color: white;
    padding: 80px 40px;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}
.cta-card h2 {
    color: white;
    font-size: 40px;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.cta-card p {
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-card .btn-primary {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 20px 48px;
    font-size: 18px;
    font-weight: 700;
}
.cta-card .btn-primary:hover {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

@media (max-width: 768px) {
    .hero-title { font-size: 48px; }
    .features { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }

    .burger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 250px;
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        z-index: 105;
        gap: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg);
    }
    
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg);
    }
}
