/* ========================================= */
/* RESET */
/* ========================================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* ========================================= */
/* ROOT */
/* ========================================= */

:root{

    --bg-primary:#1A1824;
    --bg-secondary:#232034;
    --bg-tertiary:#2C2842;
    --bg-logo:#6A638A;

    --header-bg:#242036;
    --card-bg:#232034;
    --footer-bg:#1F1D2C;

    --border-color:#3A3456;

    --text-primary:#DDD7FF;
    --text-secondary:#C2B8E8;
    --text-muted:#8E86B8;
    --text-faint:#6A638A;

    --accent:#CAB8FF;
    --accent-hover:#D8CBFF;

    --radius:14px;
    --transition:0.2s ease;
}

/* ========================================= */
/* BASE */
/* ========================================= */

body{
    background:var(--bg-primary);
    color:var(--text-primary);
    font-family:Inter,Arial,Helvetica,sans-serif;
    min-height:100vh;
    line-height:1.6;
}

a{
    color:inherit;
    text-decoration:none;
    transition:var(--transition);
}

/* ========================================= */
/* HEADER */
/* ========================================= */

.site-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:18px 40px;
    background:var(--header-bg);
    border-bottom:1px solid var(--border-color);
    position:sticky;
    top:0;
    z-index:1000;
}

.logo-area{
    display:flex;
    align-items:center;
    gap:14px;
    padding:8px 12px;
    border-radius:14px;
    background:var(--bg-logo);
    border:1px solid var(--border-color);
    box-shadow:0 6px 18px rgba(0,0,0,.25);
    transition:var(--transition);
}

.logo-area:hover{
    border-color:rgba(202,184,255,.35);
    transform:translateY(-1px);
}

.logo{
    width:42px;
    height:42px;
    object-fit:contain;
}

.logo-area h1{
    font-size:22px;
    font-weight:600;
    letter-spacing:.5px;
}

.navbar{
    display:flex;
    align-items:center;
    gap:22px;
}

.navbar a{
    color:var(--text-secondary);
    font-size:14px;
}

.navbar a:hover,
.header-button:hover{
    color:var(--text-primary);
}

.header-button{
    background:none;
    border:none;
    padding:0;
    margin:0;
    color:var(--text-secondary);
    font:inherit;
    font-size:14px;
    cursor:pointer;
    transition:var(--transition);
}

/* ========================================= */
/* HERO */
/* ========================================= */

.hero{
    max-width:1200px;
    margin:0 auto;
    padding:70px 30px;
    display:flex;
    flex-direction:column;
    gap:40px;
}

.hero-content{max-width:100%;}

.hero-content h2{
    font-size:48px;
    line-height:1.1;
    margin-bottom:20px;
    font-weight:700;
}

.hero-content p{
    color:var(--text-secondary);
    font-size:17px;
    margin-bottom:30px;
}

/* ========================================= */
/* COMMON BUTTONS */
/* ========================================= */

.hero-button,
.runtime-button,
.runtime-back-button,
.secondary-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:12px 22px;
    border-radius:10px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:var(--transition);
}

.hero-button,
.runtime-button{
    border:none;
    background:var(--accent);
    color:#14131D;
}

.hero-button:hover,
.runtime-button:hover{
    background:var(--accent-hover);
}

.runtime-back-button,
.secondary-button{
    border:1px solid var(--border-color);
    background:var(--bg-secondary);
    color:var(--text-secondary);
}

.runtime-back-button:hover,
.secondary-button:hover{
    color:var(--text-primary);
    border-color:#3a4358;
}

/* ========================================= */
/* PANELS */
/* ========================================= */

.content-card,
.runtime-panel{
    background:var(--card-bg);
    border:1px solid var(--border-color);
    border-radius:var(--radius);
    padding:24px;
}

/* ========================================= */
/* INPUTS */
/* ========================================= */

.runtime-input{
    width:100%;
    margin-bottom:20px;
    padding:13px 14px;
    border:1px solid var(--border-color);
    border-radius:10px;
    background:var(--bg-tertiary);
    color:var(--text-primary);
    font-size:14px;
    outline:none;
    transition:border-color .2s ease,background .2s ease,opacity .2s ease;
}

.runtime-input:focus{
    border-color:#5a6b8a;
    box-shadow:0 0 0 2px rgba(90,107,138,.15);
}

.runtime-input:disabled{
    opacity:.45;
    cursor:not-allowed;
}

/* ========================================= */
/* FEATURES */
/* ========================================= */

.features{
    max-width:1200px;
    margin:0 auto;
    padding:0 30px 70px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
}

.feature-card{
    background:var(--card-bg);
    border:1px solid var(--border-color);
    border-radius:var(--radius);
    padding:24px;
    transition:var(--transition);
}

.feature-card:hover{
    transform:translateY(-3px);
    border-color:var(--accent);
}

/* ========================================= */
/* AUTH OVERLAY */
/* ========================================= */

.auth-overlay{
    position:fixed;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    padding:30px;
    background:rgba(12,10,18,.82);
    backdrop-filter:blur(8px);
    z-index:5000;
}

.auth-overlay.active{display:flex;}

.auth-dialog{
    width:100%;
    max-width:420px;
}

.auth-header{
    text-align:center;
    margin-bottom:26px;
}

.auth-header h2{
    font-size:28px;
    margin-bottom:8px;
}

.auth-header p{
    color:var(--text-secondary);
    font-size:14px;
}

.auth-form{
    display:flex;
    flex-direction:column;
}

.auth-actions{
    margin-top:10px;
}

.auth-actions .runtime-button{
    width:100%;
}

.auth-error{
    min-height:20px;
    margin-top:18px;
    text-align:center;
    font-size:14px;
    color:#ff8f8f;
    visibility:hidden;
}

.auth-error.visible{visibility:visible;}

.auth-loading{
    opacity:.65;
    pointer-events:none;
}

/* ========================================= */
/* FOOTER */
/* ========================================= */

.site-footer{
    margin-top:70px;
    padding:40px 20px;
    background:var(--footer-bg);
    border-top:1px solid var(--border-color);
    text-align:center;
}

/* ========================================= */
/* RESPONSIVE */
/* ========================================= */

@media(max-width:900px){
    .site-header{
        flex-direction:column;
        text-align:center;
    }

    .hero-content h2{
        font-size:38px;
    }
}

@media(max-width:600px){
    .hero{
        padding:50px 20px;
    }

    .hero-content h2{
        font-size:30px;
    }

    .hero-content p{
        font-size:15px;
    }

    .auth-overlay{
        padding:20px;
    }

    .auth-dialog{
        max-width:100%;
    }
}
