:root {
    --text-dark: #2d3436;
    --text-light: #636e72;
    --accent: #ff7675; 
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.8);
}

body {
    margin: 0; padding: 0; font-family: 'Outfit', sans-serif;
    background-color: #f8f9fa; color: var(--text-dark);
    overflow-x: hidden; min-height: 100vh; position: relative;
}

#confetti-canvas, #solitaire-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
}
#solitaire-canvas { z-index: 9998; }

h1, h2, h3 { font-weight: 600; margin-bottom: 10px; }
h2 { font-size: 2rem; }
h3 { font-size: 1.2rem; color: var(--text-light); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px;}

.glass-card {
    background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 24px; padding: 50px; text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05); max-width: 450px; width: 90%; position: relative;
}

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 100; transition: opacity 0.6s ease;
}
.hidden { opacity: 0; pointer-events: none; display: none !important; }
.active { display: flex !important; opacity: 1; }

.riddle { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--text-light); margin-bottom: 30px; }
input[type="text"] {
    padding: 15px 20px; width: 80%; margin-bottom: 20px; box-sizing: border-box;
    border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.8);
    border-radius: 12px; font-family: 'Outfit', sans-serif; font-size: 1rem; outline: none;
}
input:focus { box-shadow: 0 0 0 3px rgba(255, 118, 117, 0.2); }

button {
    background-color: var(--text-dark); color: white; border: none;
    padding: 15px 30px; font-size: 1rem; border-radius: 30px;
    cursor: pointer; font-family: 'Outfit', sans-serif; font-weight: 600;
    transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
button:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.secondary-btn { background-color: white; color: var(--text-dark); border: 1px solid rgba(0,0,0,0.1); }
.outline-btn { background-color: transparent; color: var(--text-dark); border: 1px solid var(--text-dark); box-shadow: none; margin-top: 10px;}
.outline-btn:hover { background-color: var(--text-dark); color: white; }
#password-error { color: var(--accent); font-size: 0.9em; margin-top: 15px; }

/* CAPTCHA STYLES */
.captcha-card { padding: 0; overflow: hidden; max-width: 400px; }
.captcha-header { background-color: #4a90e2; color: white; padding: 20px; text-align: left; }
.captcha-header p { margin: 0; font-size: 1rem; opacity: 0.9; }
.captcha-header h2 { margin: 5px 0 0; font-size: 1.8rem; font-family: 'Outfit', sans-serif; }
.captcha-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 10px; background: white; }
.captcha-tile { width: 100%; aspect-ratio: 1 / 1; cursor: pointer; position: relative; overflow: hidden; background-color: #f0f0f0; }
.captcha-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.captcha-tile.selected img { transform: scale(0.85); }
.captcha-tile.selected::after {
    content: '✔'; position: absolute; top: 5px; left: 5px;
    background-color: #4a90e2; color: white; width: 24px; height: 24px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* THE TRICK BUTTONS */
.button-container { position: relative; height: 60px; margin-top: 30px; }
#yes-btn, #no-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; }
/* The updated smooth, darting transition for the No Button */
#no-btn { z-index: 10; transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* HEADER & EASTER EGG */
header { text-align: center; padding: 40px 20px 20px; }
h1 { font-size: 3.5rem; letter-spacing: -1px; margin: 0;}
.subtitle { color: var(--text-light); font-size: 1.2rem; }
#emily-name { cursor: pointer; color: var(--accent); position: relative; display: inline-block; user-select: none; -webkit-user-select: none; }
.floating-heart {
    position: absolute; font-size: 24px; pointer-events: none;
    animation: floatUp 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes floatUp { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-150px) scale(1.5); opacity: 0; } }

/* RAFFLE LAYOUT */
.raffle-section { display: flex; flex-direction: column; align-items: center; margin-bottom: 50px; }
.action-btn { margin-top: -30px; z-index: 10; font-size: 1.2rem; padding: 20px 50px; background-color: var(--accent); }
.action-btn:hover { background-color: #ff6b6b; }
.action-btn:disabled { background-color: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

#raffle-drum {
    width: 90%; max-width: 700px; height: 350px; margin: 0 auto;
    background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-radius: 40px; border: 2px solid rgba(255,255,255,0.8);
    box-shadow: inset 0 0 40px rgba(0,0,0,0.02), 0 20px 40px rgba(0,0,0,0.05);
    position: relative; overflow: hidden;
}
#gift-container { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }

/* 3D BINGO BALLS */
.gift-btn {
    width: 55px; height: 55px; position: absolute;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 18px; font-weight: 600; color: var(--text-dark);
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f0f0f0 40%, #e0e0e0 80%, #d0d0d0 100%);
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.1), 0 10px 15px rgba(0,0,0,0.1);
    border: none; user-select: none; -webkit-user-select: none;
}

.static-ball { 
    position: static; width: 55px; height: 55px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffffff 60%, #f0f0f0 90%, #e0e0e0 100%);
    box-shadow: inset -3px -3px 10px rgba(0,0,0,0.05), 0 5px 15px rgba(0,0,0,0.1); 
    border: 2px solid #ffffff; color: var(--accent) !important; 
    cursor: pointer; transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}
.static-ball:hover { transform: scale(1.15); box-shadow: inset -3px -3px 10px rgba(0,0,0,0.05), 0 10px 25px rgba(0,0,0,0.15); }

.opened {
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, rgba(200,200,200,0.2) 100%);
    color: rgba(0,0,0,0.3); box-shadow: inset -2px -2px 5px rgba(0,0,0,0.05); pointer-events: none;
}

/* RESULTS & TRAY (3x10 GRID) */
.results-section { text-align: center; max-width: 900px; margin: 0 auto 50px; padding: 0 20px; }
.pedestal-container { margin-bottom: 50px; }
#pedestal {
    width: 100px; height: 100px; margin: 0 auto; border-radius: 50%; background: rgba(255,255,255,0.5);
    border: 2px dashed rgba(0,0,0,0.1); display: flex; justify-content: center; align-items: center;
}
#pedestal .gift-btn { transform: scale(1.3); }

.tray-container { background: rgba(255,255,255,0.4); padding: 40px 20px; border-radius: 30px; border: 1px solid white; box-shadow: 0 10px 30px rgba(0,0,0,0.02);}
#collection-tray { display: grid; grid-template-columns: repeat(10, 1fr); gap: 15px; justify-items: center; align-items: center; max-width: 800px; margin: 0 auto; }
.tray-slot {
    width: 55px; height: 55px; border-radius: 50%; background: rgba(0,0,0,0.03); box-shadow: inset 0 4px 10px rgba(0,0,0,0.05);
    display: flex; justify-content: center; align-items: center; color: rgba(0,0,0,0.2); font-weight: 600; font-size: 14px;
}

/* SCRATCH-OFF MODAL ELEMENTS */
.teaser-wrapper { position: relative; display: inline-block; min-width: 200px; min-height: 40px; margin: 15px 0; }
#scratch-canvas { position: absolute; top: -10px; left: -10px; width: calc(100% + 20px); height: calc(100% + 20px); cursor: crosshair; border-radius: 8px; z-index: 10; }
#spinner-section { margin-top: 30px; padding-top: 30px; border-top: 1px solid rgba(0,0,0,0.1); }
#spinner-display { font-size: 1.5rem; font-weight: 600; color: var(--accent); margin-bottom: 20px; height: 40px; display: flex; justify-content: center; align-items: center; }

/* CANVAS WHEEL POPUP */
.wheel-card { padding: 40px; }
.canvas-wheel-wrapper { position: relative; width: 300px; height: 300px; margin: 0 auto; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 5px solid white; }
#roulette-canvas { width: 100%; height: 100%; border-radius: 50%; }
.wheel-pointer {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 30px solid var(--accent);
    z-index: 10; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

/* EMILYBOT CHAT */
.floating-chat-btn {
    position: fixed; bottom: 30px; right: 30px; width: 65px; height: 65px;
    border-radius: 50%; background-color: var(--accent); color: white;
    font-size: 30px; display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); z-index: 1000; cursor: pointer;
    border: none; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.floating-chat-btn:hover { transform: scale(1.1) translateY(-5px); box-shadow: 0 8px 25px rgba(255, 118, 117, 0.4); background-color: #ff6b6b; }
.chat-card { padding: 0; max-width: 400px; height: 500px; display: flex; flex-direction: column; overflow: hidden; }
.chat-header { background: rgba(255,255,255,0.8); padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--glass-border); }
.chat-header h3 { margin: 0; font-size: 1.1rem; color: var(--text-dark); }
#close-chat-btn { background: none; box-shadow: none; padding: 5px 10px; color: var(--text-light); }
#close-chat-btn:hover { color: var(--accent); transform: none; }
.chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; background: rgba(255,255,255,0.2); }
.message-wrapper { display: flex; flex-direction: column; max-width: 80%; }
.bot-wrapper { align-self: flex-start; }
.user-wrapper { align-self: flex-end; align-items: flex-end; }
.message-bubble { padding: 12px 16px; border-radius: 18px; font-size: 0.95rem; line-height: 1.4; text-align: left; }
.bot-msg { background: rgba(255,255,255,0.9); border: 1px solid var(--glass-border); border-bottom-left-radius: 4px; color: var(--text-dark); }
.user-msg { background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.timestamp { font-size: 0.7rem; color: var(--text-light); margin-top: 5px; margin-bottom: 5px; }
.chat-input-area { padding: 15px; background: rgba(255,255,255,0.8); border-top: 1px solid var(--glass-border); display: flex; gap: 10px; }
#chat-input { margin: 0; width: 100%; border-radius: 20px; padding: 10px 15px; }
#send-chat-btn { padding: 10px 20px; border-radius: 20px; }
.typing-indicator { font-style: italic; color: var(--text-light); font-size: 0.85rem; display: none; align-self: flex-start; margin-left: 10px; }

/* COOKIE BANNER & PREFERENCES */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(45, 52, 54, 0.95); backdrop-filter: blur(10px);
    color: white; padding: 20px; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 1000; transform: translateY(100%); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.active { transform: translateY(0); }
.cookie-banner p { margin: 0 0 15px 0; max-width: 800px; text-align: center; font-size: 0.95rem; line-height: 1.5; }
.cookie-buttons { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }

.cookie-prefs-card { text-align: left; max-width: 450px; padding: 40px; }
.preference-group { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.1); }
.preference-group:last-of-type { border-bottom: none; }

.toggle-container { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.toggle-label { font-size: 0.95rem; color: var(--text-dark); width: 75%; line-height: 1.3;}
.toggle-container input { display: none; }
.toggle-slider { width: 50px; height: 26px; background-color: #ccc; border-radius: 34px; position: relative; transition: .4s; }
.toggle-slider:before {
    content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: white; border-radius: 50%; transition: .4s;
}
.toggle-container input:checked + .toggle-slider { background-color: var(--accent); }
.toggle-container input:checked + .toggle-slider:before { transform: translateX(24px); }

.checkbox-label { display: flex; align-items: center; cursor: pointer; font-size: 0.95rem; color: var(--text-dark); }
.checkbox-label input { width: auto; margin: 0 10px 0 0; transform: scale(1.2); accent-color: var(--accent); }