:root {
    --primary: #FF385C;
    --primary-hover: #E31C59;
    --text-main: #2D2D2D;
    --text-muted: #666666;
    --bg-gradient: linear-gradient(135deg, #FFF0F3 0%, #E0F2F1 100%);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    overflow: hidden;
    /* Prevent scrolling on body */
    height: 100dvh;
    /* Use dynamic viewport height */
    width: 100vw;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    z-index: -1;
}

.quiz-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0.5rem;
    /* Aggressively reduced padding */
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    /* Ensure no scroll here */
}

.logo-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.4rem 0.8rem;
    /* Smaller padding */
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
    /* Minimal margin */
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
    font-size: 0.9rem;
    /* Slightly smaller text */
}

/* Quiz Section */
.quiz-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    /* Minimal gap */
    flex: 1;
    min-height: 0;
    /* CRITICAL: Allows flex child to shrink below content size */
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin 0.4s ease-out;
    position: relative;
    padding-bottom: 0.5rem;
}

.card-counter {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.card-stack {
    position: relative;
    width: 85%;
    /* Narrower width */
    max-width: 340px;
    /* Reduced max-width from 400px */
    flex: 1;
    /* Take available space */
    max-height: 65vh;
    min-height: 250px;
    /* Reduced min-height further */
    margin: 0.5rem auto;
    /* Center horizontally */
    display: flex;
    /* To center card if needed */
    flex-direction: column;
}

.quiz-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 1.5rem;
    /* Slightly smaller radius */
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    /* Compact padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: grab;
}

.quiz-card:active {
    cursor: grabbing;
}

.card-emoji {
    font-size: clamp(3rem, 12vh, 5rem);
    /* Smaller emoji range */
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.card-question {
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    /* Smaller text range */
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
}

/* Swipe Overlays */
.swipe-overlay {
    position: absolute;
    top: 2rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 800;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    background: white;
    backdrop-filter: blur(10px);
}

.vibe-overlay {
    right: 2rem;
    border: 4px solid #4CD964;
    color: #4CD964;
    transform: rotate(15deg);
}

.nope-overlay {
    left: 2rem;
    border: 4px solid var(--primary);
    color: var(--primary);
    transform: rotate(-15deg);
}

/* Swipe Buttons */
.swipe-buttons {
    display: flex;
    gap: 1.5rem;
    /* Reduced gap */
    margin-top: auto;
    flex-shrink: 0;
    padding-bottom: 0.5rem;
}

.swipe-btn {
    width: 3.5rem;
    /* Smaller buttons */
    height: 3.5rem;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.swipe-btn:hover {
    transform: scale(1.1);
}

.swipe-btn:active {
    transform: scale(0.95);
}

.nope-btn {
    color: var(--primary);
}

.nope-btn:hover {
    background: #FFF0F3;
}

.vibe-btn {
    color: #4CD964;
}

.vibe-btn:hover {
    background: #F0FFF4;
}

.swipe-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

.swipe-btn span {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Cheeky Toast */
.cheeky-toast {
    position: absolute;
    bottom: 6rem;
    /* Position above buttons */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(255, 56, 92, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    white-space: nowrap;
}

.cheeky-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Skip Link */
.skip-link {
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 56, 92, 0.1);
}

.skip-link:hover {
    background: rgba(255, 56, 92, 0.2);
    transform: translateY(-1px);
}

.skip-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* Waitlist Section */
.waitlist-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    padding: 0 1.5rem 2rem 1.5rem;
    /* Add horizontal padding and bottom space */
    overflow-y: auto;
    /* Enable scrolling for this section */
    max-height: 100%;
    /* Ensure it fits within container */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
}

.waitlist-section.hidden {
    display: none;
}

.reveal-headline {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-top: 2rem;
}

.reveal-subtext {
    font-size: 1.25rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 500px;
    line-height: 1.6;
}

/* Form */
.waitlist-form {
    background: white;
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
    transition: transform 0.3s ease;
}

.waitlist-form:focus-within {
    transform: translateY(-2px);
}

.input-group {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

input[type="email"] {
    width: 100%;
    border: 1px solid #E5E7EB;
    /* Faint border */
    border-radius: 0.75rem;
    /* Match button radius */
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    background: #F9FAFB;
    /* Very subtle background */
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

input[type="email"]:focus {
    border-color: var(--primary);
    background: white;
}

.waitlist-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    width: 100%;
}

.waitlist-form button:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.form-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
    text-align: center;
}

.form-success {
    font-size: 0.875rem;
    color: #4CD964;
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
    text-align: center;
    font-weight: 600;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin-top: 3rem;
}

.feature-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.icon-box {
    width: 3rem;
    height: 3rem;
    background: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-sm);
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.feature-item p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.875rem;
}

footer {
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    margin-top: auto;
}

.heart-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    color: var(--primary);
    fill: var(--primary);
}

/* Desktop Responsive */
@media (min-width: 768px) {
    .input-group {
        flex-direction: row;
    }

    input[type="email"] {
        text-align: left;
    }

    .waitlist-form button {
        width: auto;
    }

    .reveal-headline {
        font-size: 4rem;
    }
}