/* Add this at the top of your api_documentation_styles.css */
:root {
    --space-dark: #0a0e17;
    --space-blue: #1c2750;
    --gold-primary: #FFD700;
    --neon-blue: #66CCFF;
    --tech-blue: #3498db;
    --success-green: #2ecc71;
    --error-red: #e74c3c;
    --purple-accent: #8E44AD;
}

/* --- Reset and Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background: url('https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?auto=format&fit=crop&q=80&w=2070&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center fixed;
    background-size: cover;
    height: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: transparent !important;
    font-family: 'Poppins', Arial, sans-serif;
    color: #E6EDF3;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: 100px; /* ← Only top padding to make space for fixed header */
}

/* --- Improved Header Styling --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* ← Full width */
    z-index: 1000; /* ← Highest layer */
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.header-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-image {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    margin-left: auto;
}

.main-nav a {
    color: #E6EDF3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: var(--gold-primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.auth-buttons-container {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
}

.auth-button {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-button.register {
    background: rgba(255, 215, 0, 0.1);
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
}

.auth-button.login {
    background: var(--gold-primary);
    color: var(--space-dark);
    border: 1px solid var(--gold-primary);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.auth-label {
    font-size: 0.8rem;
    color: var(--neon-blue);
    display: block;
    margin-top: 5px;
}

/* --- Space Background and Effects --- */
.space-overlay, .moving-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.space-overlay {
    background: rgba(10, 14, 23, 0.95);
}

.star, .planet {
    position: absolute;
}

.star {
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: moveStar 50s linear infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.planet {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #FFDF40 20%, transparent 70%);
    border-radius: 50%;
    animation: movePlanet 100s linear infinite;
    opacity: 0.4;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

@keyframes moveStar {
    0% { transform: translateY(0) translateX(0); opacity: 0.8; }
    100% { transform: translateY(-120vh) translateX(10vw); opacity: 0; }
}

@keyframes movePlanet {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    100% { transform: translateY(-150vh) rotate(360deg); opacity: 0; }
}

/* --- API Container and Typography --- */
.api-container {
    max-width: 1200px;
    width: 90%;
    background: rgba(28, 39, 80, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.1);
    border: 1px solid var(--gold-primary);
    animation: fadeIn 1s ease-out;
    margin: 100px auto 50px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Typography and Layout --- */
h1 { 
    color: var(--gold-primary); 
    font-family: 'Orbitron', sans-serif; 
    text-align: center; 
    margin-bottom: 2rem; 
    letter-spacing: 2px; 
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7); 
    border-bottom: 2px solid var(--gold-primary); 
    padding-bottom: 15px; 
}

h2 { 
    color: var(--neon-blue); 
    font-family: 'Orbitron', sans-serif; 
    margin: 2rem 0 1rem 0; 
    font-size: 1.8rem; 
    border-bottom: 1px solid var(--neon-blue); 
    padding-bottom: 0.5rem; 
}

h3 { 
    color: var(--gold-primary); 
    font-family: 'Orbitron', sans-serif; 
    margin: 1.5rem 0 0.8rem 0; 
    font-size: 1.4rem; 
}

h4 { 
    color: var(--neon-blue); 
    margin: 1.2rem 0 0.5rem 0; 
    font-size: 1.2rem; 
}

p { 
    color: #E6EDF3; 
    font-size: 1.1rem; 
    line-height: 1.6; 
    margin-bottom: 1rem; 
}

a { 
    color: var(--neon-blue); 
    text-decoration: none; 
}

a:hover { 
    text-decoration: underline; 
}

/* --- Code Styling --- */
code { 
    background-color: rgba(0, 0, 0, 0.4); 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-family: Consolas, Monaco, 'Andale Mono', monospace; 
    color: var(--neon-blue); 
    border: 1px solid rgba(102, 204, 255, 0.2); 
}

pre { 
    background-color: rgba(0, 0, 0, 0.6) !important; 
    padding: 20px; 
    border-radius: 8px; 
    overflow-x: auto; 
    position: relative; 
    border: 1px solid var(--gold-primary); 
    margin: 20px 0; 
}

.copy-btn { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    padding: 5px 12px; 
    border: 1px solid var(--gold-primary); 
    border-radius: 4px; 
    background-color: rgba(28, 39, 80, 0.8); 
    color: var(--gold-primary); 
    cursor: pointer; 
    font-family: 'Orbitron', sans-serif; 
    transition: all 0.3s ease; 
}

.copy-btn:hover { 
    background-color: var(--gold-primary); 
    color: var(--space-dark); 
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    .main-nav ul {
        gap: 1rem;
        flex-direction: column;
    }
    .auth-buttons-container {
        flex-direction: column;
    }
    .auth-button {
        width: 100%;
        text-align: center;
    }
}