/* MABB TECH Games: palette drawn from the logo (navy -> teal) with a warm coral complement. */
:root {
    --navy-900: #0a1633;
    --navy-800: #0e1f45;   /* logo "M" / "TECH" */
    --navy-700: #163060;
    --teal-600: #0a8f9d;
    --teal-500: #0aa6b5;   /* logo mid */
    --teal-400: #19c3c9;   /* logo bright end */
    --teal-50:  #e6f7f8;
    --coral-500: #ff7a59;  /* complement to teal: calls to action */
    --coral-600: #f0603d;
    --ice:      #f4f8fb;
    --card:     #ffffff;
    --border:   #dce6ee;
    --text:     #0e1f45;
    --muted:    #5a6b85;
    --error:    #c0392b;
    --success:  #138a5b;
    --radius:   14px;
    --shadow:   0 1px 2px rgba(14,31,69,.06), 0 8px 24px rgba(14,31,69,.08);
    --font-head: "Montserrat", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    font: 16px/1.6 var(--font-body); color: var(--text); background: var(--ice);
}
body.tinted { background: radial-gradient(1200px 600px at 80% -10%, var(--teal-50), transparent 60%), var(--ice); }
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-600); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--navy-800); }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.inline { display: inline; margin: 0; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.brand-tag {
    font: 700 .72rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase;
    color: #fff; background: linear-gradient(90deg, var(--navy-800), var(--teal-500));
    padding: 5px 8px; border-radius: 6px;
}
.nav { display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 8px; color: var(--navy-800); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-user span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 600 1rem/1 var(--font-body); padding: 12px 20px; border-radius: 10px;
    border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(90deg, var(--navy-800), var(--teal-500)); color: #fff; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(10,166,181,.35); }
.btn-accent { background: var(--coral-500); color: #fff; box-shadow: 0 6px 18px rgba(255,122,89,.35); }
.btn-accent:hover { background: var(--coral-600); }
.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--border); }
.btn-ghost:hover { background: var(--teal-50); }
:focus-visible { outline: 3px solid var(--teal-400); outline-offset: 2px; }

/* Hero */
.hero {
    background:
        radial-gradient(800px 400px at 90% 10%, rgba(25,195,201,.35), transparent 60%),
        linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--teal-600) 100%);
    color: #fff; padding: 64px 0 72px;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; margin: 6px 0 16px; }
.eyebrow { margin: 0; font: 700 .8rem/1 var(--font-head); letter-spacing: .18em; text-transform: uppercase; color: var(--teal-400); }
.lead { font-size: 1.12rem; color: #d7e6f2; max-width: 34em; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.logo-plate {
    background: #fff; border-radius: 22px; padding: 28px 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35); transform: rotate(-2deg);
    border-bottom: 6px solid var(--teal-400);
}
.logo-plate img { display: block; width: 100%; }

/* Sections */
.section { padding: 48px 16px; }
.section h2 { font-size: 1.6rem; margin: 0 0 20px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; }
.step-num {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    font: 800 1rem/1 var(--font-head); color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--teal-500));
}
.game-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.game-card {
    display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; text-decoration: none; color: var(--text);
    background: var(--card); border: 1px solid var(--border); border-top: 4px solid var(--teal-500);
    border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.game-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(14,31,69,.14); }
.game-name { font: 700 1.15rem/1.3 var(--font-head); color: var(--navy-800); }
.play { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--coral-600); }
.empty { background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 24px; }
.empty p { margin: 0; }

/* Auth / profile cards */
.page { padding-top: 40px; padding-bottom: 48px; }
.auth-card {
    max-width: 440px; margin: 0 auto; background: var(--card); border: 1px solid var(--border);
    border-radius: 18px; box-shadow: var(--shadow); padding: 32px 28px; text-align: center;
    border-top: 5px solid var(--teal-500);
}
.auth-card h1 { margin: 8px 0 8px; font-size: 1.6rem; }
.auth-logo { width: 220px; margin: 0 auto 8px; display: block; }
.profile-card { text-align: left; }
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
    margin: 22px 0 14px; padding: 12px 16px; border-radius: 10px; border: 1px solid #dadce0;
    background: #fff; color: #3c4043; font: 500 1rem/1 "Roboto", var(--font-body); text-decoration: none;
    transition: background .15s, box-shadow .15s;
}
.btn-google:hover { background: #f8faff; box-shadow: 0 2px 8px rgba(60,64,67,.15); }
.fine-print { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }

/* Forms */
.field { margin: 0 0 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--navy-800); }
.field input {
    width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
}
.field input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(10,166,181,.18); }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.input-prefix:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(10,166,181,.18); }
.input-prefix span { display: flex; align-items: center; padding: 0 10px; background: #f3f0ff; color: #6441a5; font-weight: 600; font-size: .9rem; border-right: 1px solid var(--border); }
.input-prefix input { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; }
.readonly { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ice); border-radius: 10px; color: var(--muted); word-break: break-all; }
.hint, .status { display: block; margin-top: 6px; font-size: .84rem; color: var(--muted); }
.error { display: block; margin-top: 6px; font-size: .86rem; color: var(--error); font-weight: 500; }
.has-error input, .has-error .input-prefix { border-color: var(--error); }

/* Flash messages */
.flash { margin: 16px auto; max-width: 1080px; padding: 12px 16px; border-radius: 10px; font-weight: 500; }
.flash-info { background: var(--teal-50); color: var(--navy-800); border: 1px solid #bfe9ec; }
.flash-success { background: #e7f6ef; color: var(--success); border: 1px solid #bfe6d2; }
.flash-error { background: #fdecea; color: var(--error); border: 1px solid #f5c6c0; }
.auth-card .flash { margin: 18px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--card); color: var(--muted); font-size: .88rem; padding: 18px 0; }

@media (max-width: 820px) {
    .hero { padding: 40px 0 48px; }
    .hero-inner { grid-template-columns: 1fr; gap: 28px; }
    .hero-art { order: -1; max-width: 360px; }
    .logo-plate { padding: 18px 20px; }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .brand img { height: 28px; }
    .brand-tag { display: none; }
    .nav-user span { display: none; }
    .auth-card { padding: 26px 18px; }
}
