/* Starter styles: placeholder look until the design is decided. */

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #111;
    color: #f4f4f4;
    font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
}

a, a:visited { color: inherit; }

#wrapper {
    max-width: 576px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header h1 { font-size: 2.2rem; margin: 0; }
.dek { margin: 0.4rem 0 1.5rem; opacity: 0.75; }

/* The card: progress bar and pause button sit over #output.
   (They live outside #output because wtf.js replaces its contents.) */
.card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

/* Background image is set by scripts/main.js. */
#output {
    aspect-ratio: 576 / 333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, #5b2be0, #e0345b) center / cover no-repeat;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Thin story-style progress meter. Duration is set from scripts/main.js. */
.progress {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    z-index: 2;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

.progress-fill {
    display: block;
    height: 100%;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
}

.progress-fill.running {
    animation: progress-fill var(--duration, 20s) linear forwards;
}

.card.paused .progress-fill,
.card.away .progress-fill,
.card.sharing .progress-fill {
    animation-play-state: paused;
}

@keyframes progress-fill {
    to { transform: scaleX(1); }
}

.pause {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
}

.pause:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

#output h1 { font-size: 1.6rem; margin: 0; }
#output hr { display: none; }

#output.animate { transition: opacity 0.4s ease; }

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.actions h3 { margin: 0; }

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-buttons button {
    padding: 0.55rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.share-buttons button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

[hidden] { display: none !important; }

footer {
    margin-top: 3rem;
    font-size: 0.75rem;
    opacity: 0.6;
}
