:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1a1a25;
    --bg-input: #1e1e2a;
    --border-color: #2a2a3a;
    --border-glow: rgba(139, 92, 246, 0.3);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #06b6d4 100%);
    --gradient-card: linear-gradient(145deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.bg-pattern {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(59, 130, 246, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(6, 182, 212, 0.08), transparent);
}

.container { max-width: 1000px; margin: 0 auto; padding: 20px; }

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 40px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { 
    width: 48px; height: 48px; 
    background: var(--gradient-primary); 
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 24px;
    box-shadow: var(--shadow-glow);
}
.logo-text h1 { font-size: 1.5em; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo-text p { font-size: 0.8em; color: var(--text-muted); margin-top: -2px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.user-badge { 
    display: flex; align-items: center; gap: 8px; 
    padding: 8px 16px; 
    background: var(--bg-card); 
    border: 1px solid var(--border-color); 
    border-radius: 100px; 
    font-size: 0.85em; color: var(--text-secondary);
}
.user-badge .avatar { width: 24px; height: 24px; background: var(--gradient-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-title { font-size: 1.1em; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 0.85em; color: var(--text-muted); margin-top: 4px; }
.card-glow { background: var(--gradient-card); }
.card-compact { padding: 20px; }
.login-card { max-width: 420px; margin: 60px auto; }
.landing-card { max-width: 700px; margin: 40px auto; }

/* Landing Map Preview */
.landing-map-preview {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.landing-map-container {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #0a0a0f;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

#landingMapSvgContainer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-map-container svg {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.landing-map-container svg:active {
    cursor: grabbing;
}

.landing-map-hint {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.75em;
    color: var(--text-muted);
    text-align: center;
    flex-wrap: wrap;
}

.landing-map-hint span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive adjustments for landing map */
@media (max-width: 768px) {
    .landing-map-preview {
        padding: 16px;
    }
    
    .landing-map-container {
        height: 250px;
    }
    
    .landing-map-hint {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); }
.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--accent-purple); }
.btn-success { background: linear-gradient(135deg, var(--accent-green), #059669); color: white; }
.btn-success:hover { box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3); transform: translateY(-2px); }
.btn-danger { background: var(--accent-red); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px 16px; }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-input); }
.btn-large { padding: 16px 32px; font-size: 1em; border-radius: 14px; }
.btn-sm { padding: 8px 16px; font-size: 0.8em; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn.disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; pointer-events: none; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-size: 0.85em; font-weight: 500; color: var(--text-secondary); }
.form-input, .form-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95em;
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); color: var(--text-primary); }

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8em;
    font-weight: 600;
}
.status-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.status-active { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.status-active::before { background: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.status-none { background: rgba(113, 113, 122, 0.15); color: var(--text-muted); }
.status-none::before { background: var(--text-muted); }
.status-pending { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }
.status-pending::before { background: var(--accent-orange); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--accent-green); }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--accent-red); }
.alert-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--accent-blue); }
.alert-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--accent-orange); }

/* Loading */
.loading { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.2); border-radius: 50%; border-top-color: white; animation: spin 0.8s linear infinite; }
.loading-dark { border-color: rgba(139, 92, 246, 0.2); border-top-color: var(--accent-purple); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Info Grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.info-item {
    padding: 16px;
    background: var(--bg-input);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.info-item .label { font-size: 0.75em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.info-item .value { font-size: 0.95em; font-weight: 600; color: var(--text-primary); word-break: break-all; }

/* Action Buttons */
.action-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Logs */
.logs-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8em;
    color: var(--text-secondary);
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.8;
}

/* Usage Stats */
.usage-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}
.stat-card.highlight {
    background: var(--gradient-card);
    border-color: var(--border-glow);
}
.stat-value { font-size: 2.2em; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.85em; color: var(--text-muted); margin-top: 4px; }
.stat-sublabel { font-size: 0.75em; color: var(--text-muted); margin-top: 2px; }

/* Billing Summary */
.billing-summary {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.billing-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}
.billing-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}
.billing-total {
    font-weight: 700;
    font-size: 1em;
    color: var(--text-primary);
    padding-top: 12px;
    margin-top: 4px;
}
.billing-total span:last-child {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Plan Status Banner */
.plan-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
}
.plan-status-banner.free-tier {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--bg-input) 100%);
}
.plan-status-banner.credits {
    border-color: rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, var(--bg-input) 100%);
}
.plan-status-banner.metered {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--bg-input) 100%);
}
.plan-status-banner.warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, var(--bg-input) 100%);
}
.plan-status-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.plan-status-icon {
    font-size: 1.5em;
}
.plan-status-text {
    display: flex;
    flex-direction: column;
}
.plan-status-label {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text-primary);
}
.plan-status-desc {
    font-size: 0.8em;
    color: var(--text-muted);
}

/* Progress Bar */
.progress-container { margin: 20px 0; }
.progress-bar {
    height: 10px;
    background: var(--bg-input);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    transition: width 0.5s ease;
}
.progress-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.8em; color: var(--text-muted); }


/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0; }
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}
.feature-item:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.feature-icon {
    width: 40px; height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.feature-text { font-size: 0.9em; color: var(--text-secondary); }

/* Price Box */
.price-box {
    background: var(--gradient-card);
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    margin: 24px 0;
}
.price-main { font-size: 3.5em; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.price-unit { font-size: 0.3em; color: var(--text-muted); -webkit-text-fill-color: var(--text-muted); }
.price-subtitle { color: var(--accent-green); font-weight: 600; margin-top: 8px; }
.price-note { color: var(--text-muted); font-size: 0.9em; margin-top: 8px; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.step { display: flex; gap: 16px; }
.step-num {
    width: 32px; height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85em;
    flex-shrink: 0;
}
.step-content h4 { font-size: 0.95em; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.step-content p { font-size: 0.85em; color: var(--text-muted); line-height: 1.5; }
.step-content a { color: var(--accent-purple); text-decoration: none; }
.step-content a:hover { text-decoration: underline; }

/* Requirements Box */
.requirements {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
}
.requirements h4 { color: var(--accent-orange); font-size: 0.9em; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.requirements p { color: var(--text-secondary); font-size: 0.85em; line-height: 1.6; }
.requirements a { color: var(--accent-orange); }

/* Config URL Box */
.config-url-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}
.config-url-box .label { color: var(--accent-green); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.config-url-box code { color: var(--text-secondary); font-family: monospace; font-size: 0.85em; word-break: break-all; }

/* Divider */
.divider { height: 1px; background: var(--border-color); margin: 24px 0; }
.divider-text { display: flex; align-items: center; gap: 16px; color: var(--text-muted); font-size: 0.85em; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

/* Footer */
.footer { 
    text-align: center; 
    padding: 40px 20px; 
    color: var(--text-muted); 
    font-size: 0.85em; 
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}
.footer a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--accent-purple); }
.footer-links { 
    display: flex; 
    justify-content: center; 
    gap: 24px; 
    margin-bottom: 16px; 
    flex-wrap: wrap;
}

/* Legal Document Styles */
.legal-document {
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.legal-document h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 32px;
    font-style: italic;
}

.legal-document h2 {
    font-size: 1.4em;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.legal-document h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-secondary);
}

.legal-document p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.legal-document ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-document li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.legal-document a {
    color: var(--accent-purple);
    text-decoration: none;
}

.legal-document a:hover {
    text-decoration: underline;
}

.legal-footer {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 32px;
    text-align: center;
}

.legal-footer p {
    margin: 0;
    font-weight: 500;
    color: var(--text-primary);
}

/* Error Page Styles */
.error-card {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
}

.error-icon {
    font-size: 4em;
    margin-bottom: 24px;
}

.error-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.error-message {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.error-details {
    text-align: left;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}

.error-details h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.error-details ul {
    margin: 0;
    padding-left: 20px;
}

.error-details li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.error-details a {
    color: var(--accent-purple);
    text-decoration: none;
}

.error-details a:hover {
    text-decoration: underline;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.error-support {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.error-support h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.error-support p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.support-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.support-link:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: auto;
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}
.modal-icon.danger { background: rgba(239, 68, 68, 0.15); }
.modal-icon.info { background: rgba(59, 130, 246, 0.15); }
.modal-icon.success { background: rgba(16, 185, 129, 0.15); }
.modal-title { font-size: 1.3em; font-weight: 700; text-align: center; margin-bottom: 8px; }
.modal-message { color: var(--text-muted); text-align: center; font-size: 0.95em; line-height: 1.6; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; }
.modal-actions .btn { flex: 1; }

/* Credit Options */
.credit-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.credit-option {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: auto;
}
.credit-option:hover { border-color: var(--accent-purple); transform: translateY(-2px); }
.credit-option.selected { border-color: var(--accent-purple); background: rgba(139, 92, 246, 0.1); }
.credit-option .amount { font-size: 1.5em; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.credit-option .label { font-size: 0.8em; color: var(--text-muted); margin-top: 4px; }
.credit-input-group { display: flex; gap: 8px; margin-top: 12px; }
.credit-input-group .form-input { flex: 1; }

/* Server Instance Cards */
.server-instances { display: flex; flex-direction: column; gap: 16px; }
.server-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}
.server-card:hover { border-color: var(--border-glow); }
.server-card.pending { border-color: var(--accent-orange); }
.server-info { flex: 1; }
.server-region { font-size: 1.1em; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.server-region .region-flag { font-size: 1.2em; display: inline-flex; align-items: center; }
.server-region .region-flag .fi { font-size: 1.3em; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.server-details { display: flex; gap: 20px; margin-top: 8px; flex-wrap: wrap; }
.server-detail { font-size: 0.85em; color: var(--text-muted); }
.server-detail strong { color: var(--text-secondary); }
.server-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Status Dot Indicator (Requirements 2.1, 2.2, 2.3, 9.2, 9.3, 9.4, 9.5) */
.server-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 4px 10px;
    background: var(--bg-card);
    border-radius: 100px;
    font-size: 0.75em;
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.status-dot.status-green {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}
.status-dot.status-amber {
    background: var(--accent-orange);
    box-shadow: 0 0 8px var(--accent-orange);
    animation: pulse 2s infinite;
}
.status-dot.status-red {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}
.status-dot.status-gray {
    background: var(--text-muted);
}
.status-label {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Instance Counter */
.instance-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.85em;
    color: var(--text-secondary);
}
.instance-counter .count { color: var(--accent-purple); font-weight: 600; }

/* Credit Balance Display (Requirements 5.1, 7.1, 7.2, 7.4) */
.credit-card {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
}
.credit-card.low-credit {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    border-color: rgba(245, 158, 11, 0.4);
}
.credit-balance-display {
    text-align: center;
    padding: 20px 0;
}
.credit-balance-main {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.credit-card.low-credit .credit-balance-main {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.credit-balance-main .credit-symbol {
    font-size: 0.6em;
    vertical-align: top;
    margin-right: 2px;
}
.credit-balance-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.9em;
    color: var(--text-muted);
}
.credit-info-divider {
    color: var(--border-color);
}

/* Free Tier Note */
.free-tier-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 10px;
}
.free-tier-note .info-icon {
    font-size: 1.2em;
}
.free-tier-note .info-text {
    color: var(--accent-green);
    font-weight: 500;
    font-size: 0.9em;
}

/* Low Credit Warning (Requirements 7.4) */
.low-credit-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 10px;
    animation: pulse-warning 2s ease-in-out infinite;
}
.low-credit-warning .warning-icon {
    font-size: 1.2em;
}
.low-credit-warning .warning-text {
    color: var(--accent-orange);
    font-weight: 500;
    font-size: 0.9em;
}
@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* QR Code Modal Styles (Requirements 8.4) */
.qr-modal {
    max-width: 480px;
}
.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
}
.qr-code-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 40px;
    border-radius: 12px;
}
.qr-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--accent-red);
    text-align: center;
    padding: 20px;
}
.qr-error .error-icon {
    font-size: 2em;
}
.qr-error .error-hint {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-top: 8px;
}
.qr-instructions {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    text-align: left;
}
.qr-instructions h4 {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.qr-instructions ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 1.8;
}
.qr-instructions ol li {
    margin-bottom: 4px;
}
.qr-instructions ol li strong {
    color: var(--text-primary);
}
.qr-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    color: var(--accent-orange);
    font-size: 0.85em;
    text-align: center;
}

/* Download Toast */
.download-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9em;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    animation: slideUp 0.3s ease;
}
.download-toast.fade-out {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideUp {
    from { transform: translateX(-50%) translateY(100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes slideDown {
    from { transform: translateX(-50%) translateY(0); opacity: 1; }
    to { transform: translateX(-50%) translateY(100%); opacity: 0; }
}

/* Responsive */
@media (max-width: 640px) {
    .usage-stats { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.8em; }
    .price-main { font-size: 2.5em; }
    .header { flex-direction: column; gap: 16px; text-align: center; }
    .header-actions { width: 100%; justify-content: center; flex-wrap: wrap; }
    .credit-options { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .credit-option { padding: 12px 8px; }
    .credit-option .amount { font-size: 1.2em; }
    .credit-option .label { font-size: 0.7em; }
    .modal { padding: 24px 20px; max-height: calc(100vh - 40px); }
    .modal-overlay { padding: 20px 10px; align-items: flex-start; }
    .modal-actions { flex-direction: column; gap: 8px; }
    .modal-actions .btn { width: 100%; }
    .server-card { flex-direction: column; align-items: flex-start; gap: 16px; }
    .server-actions { width: 100%; justify-content: flex-end; }
    .server-details { flex-direction: column; gap: 4px; }
    .container { padding: 12px; }
    .card { padding: 20px; }
    .info-grid { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
    .action-buttons .btn { width: 100%; }
    .billing-summary { padding: 12px; }
    .plan-status-banner { flex-direction: column; gap: 12px; text-align: center; }
    .plan-status-content { flex-direction: column; }
}


/* Creation Modal Styles (Requirements 1.1, 1.2, 1.3, 1.4) */
.creation-modal {
    max-width: 420px;
    text-align: center;
}
.modal-icon.creating {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.6); }
}
.creation-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
}
.creation-spinner {
    display: flex;
    justify-content: center;
}
.loading-large {
    width: 48px;
    height: 48px;
    border-width: 4px;
}
.creation-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.status-step {
    font-size: 0.95em;
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.status-step.active {
    color: var(--accent-purple);
    font-weight: 500;
}
.status-step.complete {
    color: var(--accent-green);
}
.creation-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 24px;
    background: var(--bg-input);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.creation-timer #creationTimer {
    font-size: 1.5em;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.creation-timer .timer-label {
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.creation-note {
    padding: 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    margin-top: 8px;
}
.creation-note p {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin: 0;
}
.creation-note p.text-muted {
    margin-top: 8px;
    font-size: 0.8em;
}

/* FAQ Section Styles (Requirements 4.2, 4.3, 4.4, 4.5) */
.faq-card {
    background: var(--bg-card);
}
.faq-header {
    cursor: pointer;
    transition: all 0.2s ease;
}
.faq-header:hover {
    opacity: 0.9;
}
.faq-toggle {
    transition: transform 0.3s ease;
}
.faq-toggle.expanded {
    transform: rotate(180deg);
}
.faq-content {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.faq-section {
    margin-bottom: 0;
}
.faq-section h4 {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.faq-section p {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}
.faq-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}
.faq-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.faq-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.2s ease;
}
.faq-link:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
    transform: translateY(-2px);
}
.faq-link-icon {
    font-size: 1.2em;
}
.faq-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9em;
    line-height: 2;
}
.faq-steps li {
    margin-bottom: 4px;
}
.faq-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.faq-warning p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85em;
}
.faq-warning strong {
    color: var(--accent-orange);
}
.faq-item {
    margin-bottom: 16px;
}
.faq-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9em;
    margin-bottom: 4px;
}
.faq-item p {
    margin: 0;
    font-size: 0.85em;
}

/* Usage Examples Table */
.usage-examples-table {
    margin-top: 12px;
    overflow-x: auto;
}
.usage-examples-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
}
.usage-examples-table thead {
    background: rgba(139, 92, 246, 0.15);
}
.usage-examples-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}
.usage-examples-table td {
    padding: 10px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.usage-examples-table tbody tr:last-child td {
    border-bottom: none;
}
.usage-examples-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.08);
}
.usage-light {
    border-left: 3px solid var(--accent-green);
}
.usage-moderate {
    border-left: 3px solid var(--accent-blue);
}
.usage-heavy {
    border-left: 3px solid var(--accent-orange);
}
.usage-power {
    border-left: 3px solid var(--accent-purple);
}
.cost-free {
    color: var(--accent-green);
    font-weight: 600;
}
.cost-paid {
    color: var(--text-primary);
    font-weight: 600;
}
.table-note {
    margin-top: 8px;
    font-size: 0.8em;
    color: var(--text-muted);
    font-style: italic;
}

/* Requirements Links on Landing Page (Requirements 4.1, 4.5) */
.requirements-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.req-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 8px;
    color: var(--accent-orange);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s ease;
}
.req-link:hover {
    background: rgba(245, 158, 11, 0.25);
    transform: translateY(-2px);
}


/* ========================================
   Interactive World Map Styles
   ======================================== */

/* Map Container */
.map-container {
    background-color: #0a0a0f;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    width: 100%;
    border: 1px solid var(--border-color);
    touch-action: none; /* Prevent browser handling of touch */
}

#mapSvgContainer {
    width: 100%;
    aspect-ratio: 1440 / 562; /* Match SVG aspect ratio */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#mapSvgContainer svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#mapSvgContainer svg:active {
    cursor: grabbing;
}

/* Base styles for ALL country groups - make them dark/muted */
#mapSvgContainer svg g[id] path {
    fill: #1a1a24 !important;
    stroke: #2a2a3a !important;
    stroke-width: 0.3 !important;
    transition: fill 0.12s ease, stroke 0.12s ease;
}

/* Countries WITHOUT AWS regions - stay dark, no interaction */
#mapSvgContainer svg g.country-unavailable {
    pointer-events: none;
}

#mapSvgContainer svg g.country-unavailable path {
    fill: #151520 !important;
    stroke: #202030 !important;
}

/* Countries WITH AWS regions - brighter, interactive */
#mapSvgContainer svg g.country-available {
    cursor: pointer;
    pointer-events: all;
}

#mapSvgContainer svg g.country-available path {
    fill: #3a3a50 !important;
    stroke: #4a4a60 !important;
    stroke-width: 0.5 !important;
}

/* Hover effect - ONLY for available countries */
#mapSvgContainer svg g.country-available.country-hover path,
#mapSvgContainer svg g.country-available:hover path {
    fill: #5a5a80 !important;
    stroke: #8b5cf6 !important;
    stroke-width: 1 !important;
}

/* Selected country highlight */
#mapSvgContainer svg g.country-selected path {
    fill: #7c5cf6 !important;
    stroke: #a78bfa !important;
    stroke-width: 1.5 !important;
}

/* Exclude structural elements completely */
#mapSvgContainer svg g#figure_1,
#mapSvgContainer svg g#patch_1,
#mapSvgContainer svg g#axes_1 {
    pointer-events: none;
}

/* Map Tooltip */
#mapTooltip {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--accent-purple);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85em;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 10001;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}

/* Map Modal */
.map-modal {
    width: 95vw;
    max-width: 1200px;
    max-height: 90vh;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.map-modal .modal-title {
    margin-bottom: 8px;
}

.map-modal .modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 16px;
}

/* Zoom Controls */
.map-zoom-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.map-zoom-controls .btn {
    padding: 8px 14px;
    font-size: 0.85em;
}

.map-hint {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.map-hint span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Map Controls */
.map-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.map-selected-region {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    font-weight: 500;
    color: var(--text-primary);
}

.map-selected-region .region-flag {
    font-size: 1.2em;
}

/* Region Picker (for countries with multiple regions) */
.map-region-picker {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.map-region-picker-title {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.map-region-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-region-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    color: var(--text-primary);
    font-size: 0.9em;
}

.map-region-option:hover:not(:disabled) {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(4px);
}

.map-region-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.map-region-option .region-flag {
    font-size: 1.2em;
}

.map-region-option .region-name {
    flex: 1;
}

/* Map Alert Container */
#mapAlertContainer {
    margin-bottom: 16px;
}

/* Map Toggle Button */
.map-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.map-toggle-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.map-toggle-btn .map-icon {
    font-size: 1.1em;
}

/* Dropdown toggle for region selection method */
.region-select-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.region-select-toggle .toggle-btn {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.region-select-toggle .toggle-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.region-select-toggle .toggle-btn.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

/* Region markers (text labels) for small countries */
#mapSvgContainer svg g.region-marker {
    cursor: pointer;
    pointer-events: all !important;
}

#mapSvgContainer svg g.region-marker path {
    fill: #ffffff !important;
    stroke: #000000 !important;
    stroke-width: 2.5 !important;
    paint-order: stroke fill;
    transition: all 0.15s ease;
}

#mapSvgContainer svg g.region-marker.marker-hover path,
#mapSvgContainer svg g.region-marker:hover path {
    fill: #ffffff !important;
    stroke: #8b5cf6 !important;
    stroke-width: 3 !important;
    paint-order: stroke fill;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.9));
}

#mapSvgContainer svg g.region-marker.marker-selected path {
    fill: #e9d5ff !important;
    stroke: #7c3aed !important;
    stroke-width: 3 !important;
    paint-order: stroke fill;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 1));
}

/* French overseas territories - keep them dark */
#mapSvgContainer svg g#France path.france-overseas {
    fill: #151520 !important;
    stroke: #202030 !important;
    pointer-events: none;
}

/* Responsive adjustments for map */
@media (max-width: 768px) {
    .map-modal {
        max-width: 100%;
        padding: 16px;
        margin: 10px;
    }
    
    #mapSvgContainer {
        aspect-ratio: 1440 / 562; /* Keep original aspect ratio */
        min-height: 250px;
    }
    
    .map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .map-controls .btn {
        width: 100%;
    }
    
    .map-selected-region {
        justify-content: center;
    }
    
    .map-hint {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .map-zoom-controls {
        flex-wrap: wrap;
    }
    
    .map-zoom-controls .btn {
        flex: 1;
        min-width: 80px;
    }
}

/* ========================================
   Inline Map Styles (Primary Region Selection)
   ======================================== */

.inline-map-section {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.inline-map-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.inline-map-controls .btn {
    padding: 8px 12px;
    font-size: 0.85em;
}

.inline-map-container {
    background-color: #0a0a0f;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    width: 100%;
    border: 1px solid var(--border-color);
    touch-action: none;
}

#inlineMapSvgContainer {
    width: 100%;
    aspect-ratio: 1440 / 400;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 280px;
}

#inlineMapSvgContainer svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#inlineMapSvgContainer svg:active {
    cursor: grabbing;
}

/* Inline map country styles - same as modal map */
#inlineMapSvgContainer svg g[id] path {
    fill: #1a1a24 !important;
    stroke: #2a2a3a !important;
    stroke-width: 0.3 !important;
    transition: fill 0.12s ease, stroke 0.12s ease;
}

#inlineMapSvgContainer svg g.country-unavailable {
    pointer-events: none;
}

#inlineMapSvgContainer svg g.country-unavailable path {
    fill: #151520 !important;
    stroke: #202030 !important;
}

#inlineMapSvgContainer svg g.country-available {
    cursor: pointer;
    pointer-events: all;
}

#inlineMapSvgContainer svg g.country-available path {
    fill: #3a3a50 !important;
    stroke: #4a4a60 !important;
    stroke-width: 0.5 !important;
}

#inlineMapSvgContainer svg g.country-available.country-hover path,
#inlineMapSvgContainer svg g.country-available:hover path {
    fill: #5a5a80 !important;
    stroke: #8b5cf6 !important;
    stroke-width: 1 !important;
}

#inlineMapSvgContainer svg g.country-selected path {
    fill: #7c5cf6 !important;
    stroke: #a78bfa !important;
    stroke-width: 1.5 !important;
}

#inlineMapSvgContainer svg g#figure_1,
#inlineMapSvgContainer svg g#patch_1,
#inlineMapSvgContainer svg g#axes_1 {
    pointer-events: none;
}

/* Inline map region markers */
#inlineMapSvgContainer svg g.region-marker {
    cursor: pointer;
    pointer-events: all !important;
}

#inlineMapSvgContainer svg g.region-marker path {
    fill: #ffffff !important;
    stroke: #000000 !important;
    stroke-width: 2.5 !important;
    paint-order: stroke fill;
    transition: all 0.15s ease;
}

#inlineMapSvgContainer svg g.region-marker.marker-hover path,
#inlineMapSvgContainer svg g.region-marker:hover path {
    fill: #ffffff !important;
    stroke: #8b5cf6 !important;
    stroke-width: 3 !important;
    paint-order: stroke fill;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.9));
}

#inlineMapSvgContainer svg g.region-marker.marker-selected path {
    fill: #e9d5ff !important;
    stroke: #7c3aed !important;
    stroke-width: 3 !important;
    paint-order: stroke fill;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 1));
}

/* French overseas territories for inline map */
#inlineMapSvgContainer svg g#France path.france-overseas {
    fill: #151520 !important;
    stroke: #202030 !important;
    pointer-events: none;
}

.inline-map-hint {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-map-hint span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inline-map-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.inline-map-footer .map-selected-region {
    justify-content: center;
}

.inline-map-footer .btn-large {
    width: 100%;
}

/* Dropdown backup section */
.dropdown-backup-section {
    margin-top: 8px;
}

.dropdown-backup-section .form-group {
    margin-bottom: 12px;
}

.dropdown-backup-section .btn {
    font-size: 0.9em;
}

/* Inline map alert container */
#inlineMapAlertContainer {
    margin-bottom: 12px;
}

/* Responsive adjustments for inline map */
@media (max-width: 768px) {
    .inline-map-section {
        padding: 12px;
    }
    
    #inlineMapSvgContainer {
        aspect-ratio: 1440 / 400;
        min-height: 280px;
    }
    
    .inline-map-controls {
        flex-wrap: wrap;
    }
    
    .inline-map-controls .btn {
        flex: 1;
        min-width: 60px;
    }
    
    .inline-map-hint {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
