*{
    box-sizing:border-box;
    -webkit-tap-highlight-color:transparent;
}

:root{
    --bg:#09111d;
    --card:#172235;
    --card2:#111b2b;
    --input:#24364d;
    --blue:#4fc3f7;
    --green:#66bb6a;
    --text:#ffffff;
    --muted:#9db1c5;
    --danger:#ff6b6b;
}

html{
    /* SPEED: Browser only paints what's visible */
    content-visibility:auto;
}

body{
    margin:0;
    padding:12px;
    /* SPEED: Solid color paints instantly. Gradients are slow. */
    background:var(--bg);
    color:var(--text);
    font-family:Arial,sans-serif;
    min-height:100vh;
    -webkit-font-smoothing:antialiased;
}

.container{
    width:100%;
    max-width:760px;
    margin:auto;
}

/* TOP BAR */
.topbar{
    /* SPEED: Solid color instead of gradient */
    background:#162238;
    border-radius:20px;
    padding:22px 18px;
    margin-bottom:14px;
    border:1px solid rgba(79,195,247,.18);
    /* SPEED: Single thin shadow = 1 GPU layer instead of 3 */
    box-shadow:0 2px 8px rgba(0,0,0,.35);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    /* SPEED: Own GPU layer, never repaints on scroll */
    transform:translateZ(0);
}

.brand-left h1{
    margin:0;
    color:var(--blue);
    font-size:34px;
    letter-spacing:.5px;
}

.brand-left p{
    margin:4px 0 0 0;
    color:var(--muted);
    font-size:13px;
}

.badge{
    background:rgba(79,195,247,.14);
    border:1px solid rgba(79,195,247,.25);
    color:var(--blue);
    padding:10px 14px;
    border-radius:999px;
    font-size:12px;
    font-weight:bold;
    white-space:nowrap;
}

/* CARD */
.card{
    background:var(--card);
    border-radius:18px;
    padding:16px;
    margin-bottom:14px;
    border:1px solid rgba(255,255,255,.04);
    /* SPEED: Light shadow + GPU layer */
    box-shadow:0 2px 6px rgba(0,0,0,.25);
    transform:translateZ(0);
    /* SPEED: Browser skips rendering this if off-screen */
    content-visibility:auto;
    contain-intrinsic-size:auto 200px;
    /* SPEED: Paint and layout can't leak outside this box */
    contain:layout paint;
}

.section-title{
    color:var(--blue);
    font-size:15px;
    font-weight:bold;
    margin-bottom:14px;
}

/* GRID */
.grid{
    display:grid;
    gap:14px;
}

.grid.two{
    grid-template-columns:1fr;
}

/* INPUTS */
label{
    display:block;
    margin-bottom:7px;
    font-size:13px;
    font-weight:bold;
    color:#dce8f5;
}

input,
select,
textarea{
    width:100%;
    border:none;
    border-radius:14px;
    background:var(--input);
    color:white;
    padding:15px;
    font-size:16px;
    outline:none;
}

textarea{
    min-height:120px;
    resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
    box-shadow:0 0 0 2px rgba(79,195,247,.45);
}

/* SPACING */
.spacer{
    margin-top:14px;
}

/* UPLOADS */
.upload-box{
    background:var(--card2);
    border:2px dashed rgba(79,195,247,.5);
    border-radius:16px;
    padding:16px;
    margin-bottom:14px;
    transform:translateZ(0);
}

.upload-title{
    color:var(--blue);
    font-weight:bold;
    margin-bottom:10px;
    font-size:14px;
}

.preview{
    width:100%;
    border-radius:14px;
    margin-top:12px;
    display:none;
    border:2px solid rgba(79,195,247,.45);
}

/* BUTTONS */
.actions{
    margin-top:20px;
}

button{
    width:100%;
    border:none;
    border-radius:16px;
    padding:18px;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    /* SPEED: Only animate transform, never layout */
    transition:transform .15s ease, box-shadow .15s ease;
}

button:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(0,0,0,.3);
}

.primary{
    background:var(--blue);
    color:black;
}

.success{
    background:var(--green);
    color:black;
    display:none;
    margin-top:12px;
}

/* FOOTER */
.footer{
    text-align:center;
    margin-top:20px;
    color:#9db1c5;
    font-size:12px;
}

/* MOBILE */
@media(max-width:640px){
    body{padding:8px;}
    .topbar{flex-direction:column;align-items:flex-start;}
    .brand-left h1{font-size:28px;}
    .badge{width:100%;text-align:center;}
    .card{padding:14px;}
    button{font-size:15px;}
}

/* DESKTOP */
@media(min-width:860px){
    .grid.two{grid-template-columns:1fr 1fr;}
}