/*
 * Scooby's Hat Hut: a 2003 pet site. Aqua tabs, glossy pill buttons, Comic Sans headings,
 * Verdana everywhere else, a paw-print wallpaper and a starburst. Web-safe fonts only (CSP).
 * The Hat-O-Matic is the hero at the top; the old sidebar boxes are a row of cards under it.
 */

:root {
    --aqua: #1e88e5;
    --aqua-light: #6ec6ff;
    --aqua-dark: #0d47a1;
    --lime: #8bc34a;
    --orange: #ff9800;
    --pink: #ff4fa3;
    --ink: #1f2a37;
    --fun: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Trebuchet MS", cursive;
    --web: Verdana, Tahoma, Geneva, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #dff1ff url("paws.svg");
    color: var(--ink);
    font: 13px/1.5 var(--web);
}

a {
    color: #0645ad;
}

a:hover {
    color: var(--orange);
}

.site {
    max-width: 780px;
    margin: 16px auto;
    background: #fff;
    border: 1px solid #7fb3e0;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(13, 71, 161, 0.25);
}

/* Top strip */
.topbar {
    display: flex;
    justify-content: space-between;
    background: #eef6fc;
    border-bottom: 1px solid #c9e0f2;
    font-size: 11px;
    padding: 3px 10px;
}

.topbar .home {
    font-weight: bold;
    text-decoration: none;
}

.topbar .home:hover {
    text-decoration: underline;
}

/* Masthead: glossy logo and starburst */
.masthead {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0 50%, transparent 50%),
        linear-gradient(180deg, var(--aqua-light), var(--aqua));
    color: #fff;
    padding: 22px 20px 18px;
    overflow: hidden;
}

.logo {
    margin: 0;
    font: bold 38px/1.1 var(--fun);
    color: #fff;
    text-shadow: 2px 2px 0 var(--aqua-dark), 4px 4px 0 rgba(0, 0, 0, 0.15);
    letter-spacing: -0.5px;
}

.logo span {
    color: #ffe14d;
}

.logo small {
    font-size: 18px;
    color: #e3f2fd;
}

.tagline {
    margin: 4px 0 0;
    font: italic 14px var(--web);
    text-shadow: 1px 1px 0 var(--aqua-dark);
}

.starburst {
    position: absolute;
    right: 18px;
    top: 14px;
    width: 92px;
    height: 92px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #ffe14d;
    color: #c1121f;
    font: bold 12px/1.15 var(--fun);
    padding: 16px;
    transform: rotate(12deg);
    clip-path: polygon(50% 0%, 61% 13%, 78% 7%, 80% 24%, 97% 28%, 89% 43%, 100% 57%, 85% 66%, 88% 83%, 71% 84%, 63% 100%, 50% 90%, 37% 100%, 29% 84%, 12% 83%, 15% 66%, 0% 57%, 11% 43%, 3% 28%, 20% 24%, 22% 7%, 39% 13%);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    50% { transform: rotate(12deg) scale(1.08); }
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    background: var(--aqua-dark);
    padding: 6px 8px 0;
}

.tabs a {
    background: linear-gradient(180deg, #e3f2fd, #90caf9);
    border-radius: 8px 8px 0 0;
    color: var(--aqua-dark);
    font: bold 12px var(--web);
    padding: 6px 14px;
    text-decoration: none;
}

.tabs a:hover,
.tabs a.current {
    background: linear-gradient(180deg, #fff3c4, var(--orange));
    color: #5d2a00;
}

/* Page body: hero, then everything else */
.main {
    padding: 14px;
}

/* Hero: the Hat-O-Matic, dog on the left, buttons on the right */
.hero {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 16px;
    align-items: start;
    border: 3px solid var(--lime);
    border-radius: 12px;
    background: linear-gradient(180deg, #f1f8e9, #fff 40%);
    margin-bottom: 16px;
    padding: 14px;
}

.hero-controls h1 {
    margin: 0 0 6px;
    color: #33691e;
    font: bold 28px/1.1 var(--fun);
    text-shadow: 1px 1px 0 #c5e1a5;
}

.hero-intro {
    margin: 0 0 12px;
}

.hero-more {
    margin: 12px 0 0;
    font-size: 11px;
    color: #555;
}

/* Around the Hut: the old sidebar boxes as a row of cards */
.hut {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.hut .side-box {
    margin-bottom: 0;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.box {
    border: 2px solid #90caf9;
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 0 14px 12px;
    overflow: hidden;
}

.box h1,
.box h2 {
    margin: 0 -14px 10px;
    padding: 6px 14px;
    background: linear-gradient(180deg, #e8f5e9, #c5e1a5);
    border-bottom: 2px solid var(--lime);
    color: #33691e;
    font: bold 17px var(--fun);
}

.box h2 small {
    font-size: 12px;
    font-weight: normal;
}

.welcome h1 {
    background: linear-gradient(180deg, #fff3e0, #ffcc80);
    border-bottom-color: var(--orange);
    color: #8a3b00;
}

.beta {
    background: var(--pink);
    color: #fff;
    border-radius: 6px;
    font: bold 9px var(--web);
    padding: 1px 5px;
    vertical-align: super;
}

/* Hat-O-Matic */
.hint {
    margin: 0 0 6px;
    text-align: center;
    color: #555;
}

.stage {
    background:
        radial-gradient(ellipse at 50% 100%, #c5e1a5 0 35%, transparent 36%),
        linear-gradient(180deg, #bfe6ff, #eaf7ff);
    border: 3px inset #b0d4ee;
    border-radius: 8px;
    text-align: center;
    padding: 8px 0 0;
}

.dog {
    width: 300px;
    max-width: 86%;
    height: auto;
    overflow: visible;
}

.dog .hat {
    display: none;
}

.dog .hat.is-on {
    display: inline;
}

.dog.hop {
    animation: hop 0.35s ease-out;
}

@keyframes hop {
    40% { transform: translateY(-14px); }
}

.tail {
    transform-box: fill-box;
    transform-origin: 0% 100%;
    animation: wag 0.5s ease-in-out infinite alternate;
}

@keyframes wag {
    from { transform: rotate(-10deg); }
    to   { transform: rotate(14deg); }
}

.propeller {
    transform-box: fill-box;
    transform-origin: center;
    animation: spin 0.3s linear infinite;
}

@keyframes spin {
    50% { transform: scaleX(-1); }
}

.status {
    background: #fffde7;
    border: 1px dashed #fbc02d;
    border-radius: 6px;
    margin: 10px 0;
    padding: 6px 10px;
    text-align: center;
}

.hat-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

/* Glossy "Aqua" pill buttons */
.aqua {
    border: 1px solid #1565c0;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0 45%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(180deg, #64b5f6, #1976d2);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25);
    color: #06264d;
    cursor: pointer;
    font: bold 12px var(--web);
    padding: 8px 6px;
    white-space: nowrap;
}

.aqua:hover {
    filter: brightness(1.08);
}

.aqua[aria-pressed="true"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0 45%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(180deg, #ffcc80, var(--orange));
    border-color: #e65100;
    color: #4a1d00;
}

.aqua.surprise {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0 45%, rgba(255, 255, 255, 0) 55%),
        linear-gradient(180deg, #ff8cc6, var(--pink));
    border-color: #c2185b;
    color: #4a0027;
}

.aqua:focus-visible {
    outline: 3px solid #ffe14d;
    outline-offset: 2px;
}

/* Tips */
.tips {
    margin: 0;
    padding-left: 22px;
}

.tips li {
    margin-bottom: 4px;
}

/* Poll */
.poll {
    list-style: none;
    margin: 0;
    padding: 0;
}

.poll li {
    display: grid;
    grid-template-columns: 110px 1fr 40px;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.poll .bar {
    height: 14px;
    border: 1px solid #558b2f;
    background: #f1f8e9;
    position: relative;
}

.poll .bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--pct);
    background: linear-gradient(180deg, #aed581, #689f38);
}

.poll .pct {
    text-align: right;
    font-weight: bold;
}

.poll-foot {
    font-size: 11px;
    color: #555;
    margin: 6px 0 0;
}

/* 88x31 link buttons */
.buttons88 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.b88 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 88px;
    height: 31px;
    border: 1px solid #000;
    font: 8px/1.1 Verdana, sans-serif;
    text-align: center;
    text-decoration: none;
}

.b88 b {
    font-size: 9px;
    letter-spacing: 0.5px;
}

.b88-penguin {
    background: #0a1634;
    color: #d9b44a !important;
}

.b88-pablo {
    background: linear-gradient(180deg, #b8ec52, #6fae16);
    color: #2a1145 !important;
}

.b88-chirpr {
    background: linear-gradient(180deg, #bfe8fb, #5cbf2a);
    color: #12340a !important;
}

.b88-rom {
    background: linear-gradient(180deg, #3a6fd8, #1b3f9a);
    color: #fff !important;
}

/* Sidebar */
.side-box {
    border: 1px solid #ffb74d;
    background: #fff8e1;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 0 10px 8px;
    font-size: 12px;
}

.side-box h3 {
    margin: 0 -10px 6px;
    border-radius: 7px 7px 0 0;
    padding: 4px 10px;
    background: linear-gradient(180deg, #ffcc80, var(--orange));
    color: #4a1d00;
    font: bold 13px var(--fun);
}

.side-box p {
    margin: 4px 0;
}

.hotm {
    font-size: 40px;
    text-align: center;
    line-height: 1.2;
}

.online {
    background: #f1f8e9;
    border-color: var(--lime);
}

.online h3 {
    background: linear-gradient(180deg, #dcedc8, var(--lime));
    color: #1b3a00;
}

.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #43a047;
    box-shadow: 0 0 4px #43a047;
}

kbd {
    border: 1px solid #999;
    border-radius: 3px;
    background: #f5f5f5;
    font: 11px var(--web);
    padding: 0 3px;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.badges li {
    width: 120px;
    border: 2px outset #ddd;
    background: #eee;
    font: 10px/1.3 Verdana, sans-serif;
    padding: 4px;
    text-align: center;
}

.badge-ie {
    background: linear-gradient(180deg, #e3f2fd, #bbdefb) !important;
}

.badge-flash {
    background: linear-gradient(180deg, #ffebee, #ffcdd2) !important;
}

/* Footer */
.site-footer {
    border-top: 3px solid var(--aqua);
    background: #eef6fc;
    font-size: 11px;
    padding: 8px 14px;
    text-align: center;
}

.site-footer p {
    margin: 3px 0;
}

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hut {
        grid-template-columns: 1fr 1fr;
    }
}

/* Phones: one column */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .site {
        margin: 0;
        border: 0;
        box-shadow: none;
    }

    .main {
        padding: 10px;
    }

    .hero {
        padding: 10px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 30px;
        padding-right: 70px;
    }

    .starburst {
        width: 72px;
        height: 72px;
        font-size: 10px;
        padding: 12px;
        right: 8px;
    }

    .poll li {
        grid-template-columns: 96px 1fr 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .starburst,
    .tail,
    .propeller,
    .dog.hop {
        animation: none;
    }
}
