:root {
    --primary: #ff8fa3;
    --secondary: #ffb3c1;
    --accent: #fb6f92;
    --background: #fff0f3;
    --white: #ffffff;
    --surface: #fff8fa;
    --surface-strong: #ffffff;
    --text: #4b466f;
    --muted: #756f94;
    --mint: #b8f2d5;
    --shadow: 0 18px 45px rgba(251, 111, 146, 0.18);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Quicksand', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(184, 242, 213, 0.55), transparent 30rem),
        radial-gradient(circle at bottom right, rgba(255, 179, 193, 0.55), transparent 32rem),
        var(--background);
    color: var(--text);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.background-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.heart {
    position: absolute;
    color: var(--primary);
    opacity: 0.6;
    font-size: 1.5rem;
    animation: float 10s linear infinite;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

.container {
    width: min(100%, 450px);
    position: relative;
    z-index: 10;
}

.card {
    background: rgba(255, 255, 255, 0.92);
    padding: clamp(1.4rem, 4vw, 2.5rem);
    border-radius: 1.35rem;
    box-shadow: var(--shadow);
    text-align: center;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: 2px solid rgba(255, 179, 193, 0.85);
    backdrop-filter: blur(10px);
}

.card.active {
    display: block;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.title {
    font-family: 'Pacifico', cursive;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    line-height: 1.2;
}

.question {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--muted);
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
    min-height: 60px;
}

.btn {
    min-height: 48px;
    padding: 0.82rem 1.6rem;
    border: none;
    border-radius: 50px;
    font-size: clamp(0.98rem, 2vw, 1.08rem);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    font-family: 'Quicksand', sans-serif;
    line-height: 1.2;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 143, 163, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-primary:hover {
    background-color: var(--accent);
}

.btn-secondary {
    background-color: #eef7f2;
    color: var(--text);
}

#btn-no {
    position: relative;
    transition: all 0.2s ease;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 0.95rem;
    border: 2px solid var(--secondary);
    border-radius: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    outline: none;
    color: var(--text);
}

input:focus {
    border-color: var(--accent);
}

.invite-page {
    align-items: flex-start;
}

.invite-page .container {
    width: min(100%, 940px);
}

.invite-page #step-1,
.invite-page #step-2,
.invite-page #step-4 {
    max-width: 470px;
    margin: 0 auto;
}

.invite-page #step-3 {
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.choice-label {
    margin: 1rem 0 0.75rem;
    color: var(--accent);
    font-weight: 700;
    text-align: left;
}

.choice-label-muted {
    color: #9a9a9a;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.7rem, 1.5vw, 1rem);
    margin-bottom: 1.35rem;
    min-height: 236px;
}

.choice-grid-empty {
    min-height: 0;
    margin-bottom: 0.5rem;
}

.choice-card {
    appearance: none;
    background: var(--surface);
    border: 2px solid var(--secondary);
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.55rem;
    min-width: 0;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    font-family: 'Quicksand', sans-serif;
    color: var(--text);
    min-height: 108px;
}

.choice-card:hover,
.choice-card:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(251, 111, 146, 0.18);
    outline: none;
    transform: translateY(-2px);
}

.choice-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(251, 111, 146, 0.16);
}

.choice-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 11;
    border-radius: 0.75rem;
    object-fit: cover;
    background: #fff;
}

.choice-emoji {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    background:
        linear-gradient(135deg, rgba(255, 179, 193, 0.28), rgba(184, 242, 213, 0.45)),
        #fff;
    font-size: clamp(2rem, 4vw, 3rem);
}

.choice-card > span:not(.choice-emoji) {
    display: block;
    min-height: 2.7rem;
    font-size: 0.98rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.choice-card .choice-emoji {
    min-height: 0;
}

.celebration-emoji {
    font-size: 3rem;
    margin-top: 1.5rem;
}

.result-box {
    display: none;
    margin-top: 2rem;
    text-align: left;
    animation: fadeIn 0.5s ease-out forwards;
}

.result-title {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.copy-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.copy-group input {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    background: #fdfdfd;
}

.copy-group button {
    white-space: nowrap;
    width: auto;
}

.note-temp {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    margin-top: 1rem;
    line-height: 1.5;
}

.results-page {
    align-items: flex-start;
}

.admin-container {
    width: min(100%, 960px);
    background: rgba(255, 255, 255, 0.92);
    padding: clamp(1.25rem, 4vw, 2.5rem);
    border-radius: 1.35rem;
    border: 2px solid rgba(255, 179, 193, 0.85);
    margin: 0 auto;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--secondary);
    vertical-align: top;
}

th {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

td {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.no-responses {
    text-align: center;
    color: var(--muted);
    padding: 2rem 0;
    font-style: italic;
    line-height: 1.5;
}

.info-header {
    text-align: center;
    margin-bottom: 2rem;
}

.info-header p {
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

/* Confetti Styles */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    z-index: 1000;
}

@media (min-width: 721px) {
    .invite-page {
        align-items: center;
    }
}

@media (max-width: 720px) {
    body {
        align-items: flex-start;
        padding: 1rem;
    }

    .container {
        width: 100%;
    }

    .card {
        border-width: 2px;
        box-shadow: 0 10px 24px rgba(251, 111, 146, 0.15);
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        padding-inline: 1rem;
    }

    .choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
        min-height: 0;
    }

    .copy-group {
        flex-direction: column;
    }

    .copy-group button {
        width: 100%;
    }

    .result-box {
        margin-top: 1.5rem;
    }

    .admin-container {
        border-radius: 1.1rem;
    }

    .table-wrap {
        overflow: visible;
    }

    table,
    thead,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    table {
        margin-top: 0;
    }

    thead {
        display: none;
    }

    tr {
        margin: 1rem 0;
        padding: 1rem;
        border: 2px solid var(--secondary);
        border-radius: 1rem;
        background: var(--surface);
    }

    td {
        display: grid;
        grid-template-columns: 8.5rem minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0.55rem 0;
        border-bottom: 1px solid rgba(255, 179, 193, 0.6);
    }

    td:last-child {
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--accent);
        font-weight: 700;
    }
}

@media (max-width: 420px) {
    body {
        padding: 0.75rem;
    }

    .card {
        border-radius: 1.1rem;
        padding: 1.15rem;
    }

    .choice-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .choice-card {
        display: grid;
        grid-template-columns: minmax(88px, 34%) 1fr;
        align-items: center;
        text-align: left;
        min-height: 92px;
    }

    .choice-card img,
    .choice-emoji {
        aspect-ratio: 16 / 11;
    }

    .choice-card > span:not(.choice-emoji) {
        min-height: 0;
    }

    td {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

@media (max-height: 720px) and (min-width: 721px) {
    body {
        align-items: flex-start;
    }
}
