:root {
    --primary: #ff3e3e;
    --secondary: #7000ff;
    --bg: #000000;
}

body {
    background-color: var(--bg);
    color: white;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    touch-action: none;
    height: 100vh;
    width: 100vw;
}

.title-font {
    font-family: 'Bungee', cursive;
}

/* Card Stack Styles */
#app {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.card-container {
    position: relative;
    width: 90vw;
    max-width: 400px;
    height: 70vh;
    max-height: 600px;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    /* border-radius: 24px; REMOVED: Now on inner/front/back */
    /* padding: 2rem; REMOVED: Now on front/back */
    /* display: flex; REMOVED */
    /* flex-direction: column; REMOVED */
    /* justify-content: center; REMOVED */
    /* align-items: center; REMOVED */
    /* text-align: center; REMOVED */
    /* background: ... REMOVED */
    /* border: ... REMOVED */
    /* box-shadow: ... REMOVED: Handled on front/back or inner? Actually let's put it on card-inner to rotate with it? Or keep on card and rotate inner?
       Better approach: .card is the container. .card-inner is the flipper.
    */
    perspective: 1000px;
    cursor: grab;
    user-select: none;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #2a2a2a 0%, #111 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.card:active {
    cursor: grabbing;
}

/* Stats UI */
.stats-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-weight: 600;
}

.info-btn {
    width: 20px;
    /* Reduced from 24px */
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 10px;
    /* Smaller font */
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-info-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.info-btn:hover,
.close-info-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    border-color: white;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
    font-weight: bold;
}

.card:active {
    cursor: grabbing;
}

.card h2 {
    font-size: 6rem;
    /* Big emojis */
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    /* Ensure emoji doesn't block clicks to things behind it if needed, but here it is fine */
}

.card p {
    font-size: 1.75rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Swiping Indicators */
.swipe-hint {
    position: absolute;
    top: 20px;
    font-weight: 900;
    padding: 5px 15px;
    border-radius: 8px;
    border: 4px solid;
    opacity: 0;
    transform: rotate(-15deg);
    z-index: 10;
    pointer-events: none;
}

.hint-left {
    right: 20px;
    color: #4dff88;
    border-color: #4dff88;
    transform: rotate(15deg);
}

.hint-right {
    left: 20px;
    color: #ff4d4d;
    border-color: #ff4d4d;
}

/* Particles/Background Glow */
/* Particles/Background Glow */
.bg-glow {
    display: none;
}

/* Controls */
.controls {
    position: absolute;
    bottom: 5vh;
    display: flex;
    gap: 2rem;
}

.btn-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-circle:active {
    transform: scale(0.85);
}

.btn-skip {
    color: #ff3e3e;
}

.btn-next {
    color: #4dff88;
}

/* Animation Classes */
.swipe-exit-left {
    transform: translate(-200%, 0) rotate(-30deg) !important;
    transition: transform 0.5s ease-in !important;
}

.swipe-exit-right {
    transform: translate(200%, 0) rotate(30deg) !important;
    transition: transform 0.5s ease-in !important;
}

/* Modal Styles */
.modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    perspective: 1000px;
}

.modal-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
    opacity: 0;
    transform: rotateY(-90deg) scale(0.9);
}

.modal-card.active {
    opacity: 1;
    transform: rotateY(0) scale(1);
}

.modal-card.closing {
    opacity: 0;
    transform: rotateY(90deg) scale(0.9);
}