:root {
    /* Premium High-Tech Dark Theme */
    --bg-base: #0b1120;
    --bg-gradient: radial-gradient(circle at top right, #1e1b4b, #0f172a 40%, #020617 100%);
    --text-dark: #f8fafc;
    --text-light: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    
    --color-yes: #10b981;
    --color-no: #ef4444;
    --color-meh: #64748b;
    --color-primary: #3b82f6;
    --color-primary-glow: rgba(59, 130, 246, 0.5);

    /* Typography */
    --font-main: 'Heebo', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    background-color: var(--bg-base);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1, h2, h3, h4 {
    font-weight: 900;
    color: #ffffff;
}

.app-container {
    width: 100%;
    max-width: 600px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1.5rem;
}

/* Screens */
.screen {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* Landing Section */
#landing-screen {
    text-align: center;
    justify-content: center;
    align-items: center;
}

.emoji-hero {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.2));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.main-title span {
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 3rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* Buttons */
.action-btn {
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    font-family: inherit;
    font-weight: 700;
    background: var(--color-primary);
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: 99px;
    box-shadow: 0 0 20px var(--color-primary-glow);
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--color-primary);
    background: #2563eb;
}

.massive-btn {
    font-size: 1.5rem;
    padding: 1.2rem 3rem;
}

/* Quiz Section */
.quiz-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.4s ease;
}

.question-counter {
    font-weight: 600;
    color: var(--text-light);
}

/* Card Stack */
.cards-stack {
    position: relative;
    width: 100%;
    height: 380px;
    perspective: 1000px;
    margin-bottom: 2rem;
}

.quiz-card {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
}

.quiz-card.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 10;
    pointer-events: auto;
}

.quiz-card.swipe-left {
    transform: translateX(-150%) rotate(-15deg);
    opacity: 0;
}

.quiz-card.swipe-right {
    transform: translateX(150%) rotate(15deg);
    opacity: 0;
}

.card-icon {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.card-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
}

/* Controls */
.swipe-controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.control-btn {
    flex: 1;
    padding: 1.2rem 0;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    transition: transform 0.1s, background 0.3s;
    color: white;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(255,255,255,0.1);
}

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

.no-btn:hover { border-color: var(--color-no); color: var(--color-no); }
.meh-btn:hover { border-color: var(--color-meh); color: #cbd5e1; }
.yes-btn:hover { border-color: var(--color-yes); color: var(--color-yes); }

/* Loading */
#loading-screen {
    justify-content: center;
    align-items: center;
}

.rocket {
    font-size: 5rem;
    animation: flyUp 2s infinite ease-in-out alternate;
}

@keyframes flyUp {
    from { transform: translateY(0); }
    to { transform: translateY(-30px); }
}

/* Results Section */
#results-screen {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.results-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.top-winner-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transform: scale(0);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.top-winner-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: var(--party-color);
    box-shadow: 0 0 20px var(--party-color);
}

@keyframes popIn {
    to { transform: scale(1); }
}

.winner-match {
    font-size: 4rem;
    font-weight: 900;
    color: var(--party-color);
    line-height: 1;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.winner-name {
    font-size: 2rem;
    font-weight: 900;
    margin-top: 0.5rem;
}

.animated-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.bar-container {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bar-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    background: var(--party-color);
    opacity: 0.3;
    width: 0%; 
    transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.bar-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 0.5rem;
    font-weight: 700;
}

.bar-match {
    color: var(--party-color);
    font-size: 1.1rem;
}

/* Detailed Breakdown Section */
.breakdown-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.breakdown-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.breakdown-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.breakdown-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bk-question-text {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    display: flex;
    gap: 0.5rem;
}

.bk-axis-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
    position: relative;
    margin: 1.5rem 0 0.5rem 0;
}

.bk-axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
}

.bk-marker {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
    transition: left 0.5s ease;
}

.actions {
    text-align: center;
}
