*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    gap: 14px;
    margin: 0;
    padding: 28px 0;
    background-color: #1a2040;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── Animations ──────────────────────────────────── */

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

@keyframes circlePop {
    from { opacity: 0; transform: scale(0.55); }
    to   { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeUp 0.32s ease backwards;
}

/* ── Frosted glass card ──────────────────────────── */

.container {
    position: relative;
    text-align: center;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    padding: 24px 24px 20px;
    max-width: 580px;
    width: 90%;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    overflow: visible;
}

/* ── Share button ────────────────────────────────── */

.share-button {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.65);
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10;
}

.share-button:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    transform: scale(1.1);
}

#share-icon {
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-button.copied {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 160, 90, 0.45);
    color: #27ae60;
}

/* ── Form screen ─────────────────────────────────── */

.form-title {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: #1a1a2e;
}

.form-subtitle {
    font-size: 0.88em;
    margin: 0 0 18px;
    color: #555;
}

#names-input {
    width: 100%;
    height: 128px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.82);
    padding: 14px 16px;
    font-size: 1em;
    font-family: Arial, sans-serif;
    resize: none;
    outline: none;
    margin-bottom: 14px;
    color: #1a1a2e;
    line-height: 1.65;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#names-input::placeholder { color: #b0b0b8; }

#names-input:focus {
    border-color: rgba(58, 86, 232, 0.55);
    box-shadow: 0 0 0 3px rgba(58, 86, 232, 0.14);
}

/* ── Buttons ─────────────────────────────────────── */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #3a56e8 0%, #5b7cff 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: transform 0.15s, box-shadow 0.15s;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(58, 86, 232, 0.42);
}

.button:active {
    transform: translateY(0);
    box-shadow: none;
}

.shuffle-button {
    width: 100%;
    font-size: 1em;
    padding: 13px 20px;
    margin-top: 0;
    border-radius: 11px;
}

.new-names-button {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    margin-left: 8px;
    box-shadow: none;
}

.new-names-button:hover {
    background: rgba(0, 0, 0, 0.18);
    box-shadow: none;
    transform: translateY(-1px);
}

/* ── Dashboard header ────────────────────────────── */

#greeting {
    font-size: 1.85em;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #1a1a2e;
    margin: 0 0 3px;
}

#time {
    font-size: 0.75em;
    font-weight: 600;
    color: #555;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 14px 0 4px;
}

/* ── Name circles ────────────────────────────────── */

.row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 7px;
    position: relative;
    cursor: default;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: circlePop 0.3s ease both;
}

.circle:hover {
    transform: scale(1.16) translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
    z-index: 5;
}

.circle:hover::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: rgba(18, 18, 18, 0.9);
    z-index: 11;
}

.circle:hover::after {
    content: attr(data-fullname);
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 13px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(0,0,0,0.32);
    z-index: 10;
}

/* ── Outside-card text (quote) ───────────────────── */

#footer-text {
    width: 88%;
    max-width: 520px;
    min-height: 180px;
    margin-top: 14px;
    text-align: center;
    color: #fff;
}

#quote {
    font-size: 1.5em;
    font-weight: 700;
    font-style: italic;
    margin: 0 0 7px;
    line-height: 1.5;
    text-shadow: 0 1px 6px rgba(0,0,0,0.65), 0 3px 16px rgba(0,0,0,0.38);
}

#quote-author {
    font-size: 0.88em;
    font-weight: 600;
    margin: 0;
    opacity: 0.85;
    text-shadow: 0 1px 5px rgba(0,0,0,0.55);
    letter-spacing: 0.03em;
}
