* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc);
    color: #123;
    line-height: 1.5;
}

body.dark {
    background: #0f172a;
    color: #e5e7eb;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(14, 165, 233, .92);
    color: #fff;
    padding: 14px;
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    background: #fff;
    color: #0ea5e9;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .15);
}

.brand h1 {
    font-size: 1.4rem;
}

.brand p {
    font-size: .9rem;
    opacity: .9;
}

main {
    max-width: 760px;
    margin: auto;
    padding: 16px;
    display: grid;
    gap: 16px;
}

.card {
    background: rgba(255, 255, 255, .9);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
    backdrop-filter: blur(8px);
    transition: .2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

body.dark .card {
    background: #111827;
    color: #e5e7eb;
}

.hero {
    text-align: center;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero p {
    opacity: .8;
    margin-bottom: 14px;
}

input,
select,
button {
    width: 100%;
    margin: 7px 0;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
}

body.dark input,
body.dark select {
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
}

button {
    background: #0ea5e9;
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

button:hover {
    opacity: .95;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

ul {
    padding-left: 18px;
}

li {
    margin: 8px 0;
}

video {
    width: 100%;
    min-height: 220px;
    background: #000;
    border-radius: 14px;
}

canvas {
    width: 100%;
    background: #fff;
    border-radius: 12px;
}

body.dark canvas {
    background: #1e293b;
}

#postureStatus .warn,
#blinkStatus .warn {
    color: #ef4444;
    font-weight: 700;
}

#postureStatus .ok,
#blinkStatus .ok {
    color: #10b981;
    font-weight: 700;
}

footer {
    text-align: center;
    padding: 22px;
    font-size: .95rem;
    opacity: .8;
}

footer a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 700;
}

.break-mode::before {
    content: "BREAK TIME • LOOK FAR • BLINK";
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .85);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    z-index: 9999;
    text-align: center;
    padding: 20px;
}

@media(max-width:600px) {

    main {
        padding: 10px;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .brand h1 {
        font-size: 1.2rem;
    }

    .logo {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

.upload-label {
    display: block;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 6px;
}

.hint {
    display: block;
    font-size: .85rem;
    opacity: .7;
    margin-top: 4px;
    margin-bottom: 8px;
}

body::after {
    content: "© Silverhawk Network";
    position: fixed;
    bottom: 6px;
    right: 10px;
    font-size: 11px;
    opacity: .35;
    pointer-events: none;
}

html {
    -webkit-user-select: none;
    user-select: none;
}

img {
    pointer-events: none;
}