@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root{
    --bg: #f3f5f9;
    --card-bg: #ffffff;
    --text: #1c2430;
    --text-muted: #667085;
    --border: #e5e9f0;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
    --shadow: 0 10px 30px rgba(20, 30, 60, .08);
}

[data-theme="dark"]{
    --bg: #0f1420;
    --card-bg: #171e2d;
    --text: #eef1f6;
    --text-muted: #9aa4b5;
    --border: #262f42;
    --shadow: 0 10px 30px rgba(0,0,0,.45);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

html, body{
    height:100%;
}

body{
    min-height:100vh;
    background:var(--bg);
    color:var(--text);
    transition: background .3s ease, color .3s ease;
    display:flex;
    flex-direction:column;
}

.bg-image{
    position:fixed;
    inset:0;
    z-index:-1;
    background:
        radial-gradient(circle at 15% 10%, rgba(37,99,235,.10), transparent 45%),
        radial-gradient(circle at 85% 0%, rgba(22,163,74,.08), transparent 40%);
}

main{
    flex:1;
}

/* ── Navbar ── */
.navbar{
    position:sticky;
    top:0;
    z-index:100;
    background:var(--card-bg);
    border-bottom:1px solid var(--border);
    box-shadow:var(--shadow);
}

.navbar-inner{
    max-width:1200px;
    margin:0 auto;
    padding:14px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.brand{
    font-size:18px;
    font-weight:800;
    color:var(--text);
    text-decoration:none;
    white-space:nowrap;
}

.brand span{
    color:var(--blue);
    font-weight:700;
}

.nav-links{
    list-style:none;
    display:flex;
    gap:26px;
    flex:1;
    justify-content:center;
}

.nav-links a{
    text-decoration:none;
    color:var(--text-muted);
    font-weight:600;
    font-size:14px;
    padding:8px 4px;
    border-bottom:2px solid transparent;
    transition:.2s;
}

.nav-links a:hover{
    color:var(--blue);
}

.nav-links a.active{
    color:var(--blue-dark);
    border-bottom-color:var(--blue);
}

.theme-toggle{
    width:40px;
    height:40px;
    border-radius:50%;
    border:1px solid var(--border);
    background:var(--bg);
    box-shadow:var(--shadow);
    cursor:pointer;
    font-size:17px;
    flex-shrink:0;
}

.nav-toggle{
    display:none;
    flex-direction:column;
    justify-content:center;
    gap:5px;
    width:34px;
    height:34px;
    background:none;
    border:none;
    cursor:pointer;
    flex-shrink:0;
}

.nav-toggle span{
    display:block;
    height:2.5px;
    width:100%;
    background:var(--text);
    border-radius:2px;
}

/* ── Shared card styling (used across pages) ── */
.card{
    background:var(--card-bg);
    border:1px solid var(--border);
    border-radius:18px;
    padding:28px;
    box-shadow:var(--shadow);
    animation:fadeUp .4s ease;
}

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

.card-title{
    font-size:19px;
    font-weight:700;
    margin-bottom:18px;
}

.container{
    max-width:680px;
    margin:0 auto;
    padding:40px 18px;
    position:relative;
    z-index:2;
    display:flex;
    flex-direction:column;
    gap:22px;
}

.container-wide{
    max-width:1000px;
}

/* ── Buttons ── */
.btn{
    display:inline-block;
    background:var(--blue);
    color:#fff;
    font-weight:700;
    padding:14px 32px;
    border:none;
    border-radius:12px;
    text-decoration:none;
    cursor:pointer;
    font-size:15px;
    transition:transform .2s ease, background .2s ease;
}

.btn:hover{
    background:var(--blue-dark);
    transform:translateY(-2px) scale(1.02);
}

.btn-light{
    background:#fff;
    color:var(--blue-dark);
    box-shadow:0 8px 22px rgba(0,0,0,.2);
}

.btn-light:hover{
    background:#f3f5f9;
}

/* ── Messages ── */
.error-message,
.warning-message,
.suggestion-message{
    margin-top:8px;
    padding:10px 12px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    display:none;
}

.error-message{
    color:var(--red);
    background:rgba(220,38,38,.08);
    border-left:4px solid var(--red);
}

.warning-message{
    color:var(--amber);
    background:rgba(217,119,6,.08);
    border-left:4px solid var(--amber);
}

.suggestion-message{
    color:var(--blue-dark);
    background:rgba(37,99,235,.08);
    border-left:4px solid var(--blue);
}

/* ── Footer ── */
.footer{
    text-align:center;
    padding:30px 10px 40px;
    color:var(--text-muted);
    font-size:13px;
}

.footer strong{
    color:var(--text);
}

/* ── Responsive navbar ── */
@media(max-width:768px){
    .nav-toggle{
        display:flex;
        order:2;
    }

    .theme-toggle{
        order:3;
    }

    .brand{
        order:1;
    }

    .nav-links{
        position:absolute;
        top:100%;
        left:0;
        right:0;
        flex-direction:column;
        background:var(--card-bg);
        border-bottom:1px solid var(--border);
        box-shadow:var(--shadow);
        max-height:0;
        overflow:hidden;
        transition:max-height .25s ease;
        gap:0;
    }

    .nav-links.open{
        max-height:300px;
    }

    .nav-links li{
        width:100%;
    }

    .nav-links a{
        display:block;
        padding:14px 20px;
        border-bottom:1px solid var(--border);
        border-left:3px solid transparent;
    }

    .nav-links a.active{
        border-bottom-color:var(--border);
        border-left-color:var(--blue);
        background:rgba(37,99,235,.06);
    }
}
