:root {
    --cream: #FFF4E0;
    --gold: #D4A574;
    --gold-dark: #B8860B;
    --brown: #8B5A2B;
    --text: #4A3520;
    --muted: #9A7B4F;
    --rare-gold: #FFD700;
    --mythic-gradient: linear-gradient(135deg, #FF69B4, #9932CC, #4169E1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Georgia, serif;
    background: linear-gradient(180deg, var(--cream) 0%, #FFEED0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    color: var(--text);
}
.container { max-width: 520px; width: 100%; text-align: center; }
h1 { font-size: 2.3rem; color: var(--brown); margin-bottom: 0.4rem; letter-spacing: 1px; }
.tagline { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.6rem; }
.streak { display: inline-block; font-size: 0.85rem; color: var(--brown); background: #F5E6CC; padding: 0.25rem 0.8rem; border-radius: 20px; margin-bottom: 1.4rem; }
.tabs { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.tab { padding: 0.5rem 1.4rem; border-radius: 30px; border: none; cursor: pointer; font-size: 0.95rem; transition: all 0.25s ease; }
.tab.active { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: white; box-shadow: 0 3px 10px rgba(139,90,43,0.25); }
.tab.inactive { background: #E8D4B8; color: var(--brown); }
.tab.inactive:hover { background: #DCC49E; }
.tab:disabled { cursor: default; }
.cookie-icon { font-size: 5.5rem; margin: 1.5rem 0; cursor: pointer; transition: transform 0.3s ease; user-select: none; filter: drop-shadow(0 4px 6px rgba(139,90,43,0.15)); animation: wobble 2.8s ease-in-out infinite; }
.cookie-icon:hover { transform: scale(1.08); }
@keyframes wobble { 0%,85%,100% { transform: rotate(0); } 89% { transform: rotate(-8deg); } 93% { transform: rotate(8deg); } 97% { transform: rotate(-4deg); } }
.cookie-icon.opening { animation: crack 0.8s ease forwards; }
@keyframes crack { 0% { transform: scale(1) rotate(0); } 30% { transform: scale(1.2) rotate(-10deg); } 60% { transform: scale(1.25) rotate(10deg); } 100% { transform: scale(0.6); opacity: 0; } }
.odds { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; line-height: 1.6; }
.btn-main { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: white; border: none; padding: 1rem 2.6rem; font-size: 1.15rem; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(139,90,43,0.2); }
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139,90,43,0.3); }
.locked-note { margin-top: 1.2rem; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--brown); }
.fortune-card { background: white; padding: 2rem 1.5rem; border-radius: 16px; box-shadow: 0 5px 25px rgba(0,0,0,0.08); margin: 1.5rem 0; border: 2px solid #F0E6D2; display: none; animation: pop 0.5s ease; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fortune-card.rare { border-color: var(--rare-gold); background: linear-gradient(135deg, #FFFCF5, #FFF9E6); box-shadow: 0 0 20px rgba(255,215,0,0.25); }
.fortune-card.legendary { border: 3px solid var(--rare-gold); background: linear-gradient(135deg, #FFFDF5, #FFF8DC); box-shadow: 0 0 25px rgba(255,215,0,0.4), 0 0 50px rgba(153,50,204,0.15); }
.fortune-card.mythic { border: 3px solid #9932CC; background: linear-gradient(135deg, #FFF5FB, #F5EEFF, #EEF3FF); box-shadow: 0 0 30px rgba(255,105,180,0.35), 0 0 60px rgba(65,105,225,0.25); }
.rarity-badge { display: inline-block; padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.rarity-badge.common { background: #F0E6D2; color: var(--brown); }
.rarity-badge.rare { background: #FFF3B0; color: #8B6508; }
.rarity-badge.legendary { background: linear-gradient(135deg, #FFD700, #DAA520); color: #4A3000; }
.rarity-badge.mythic { background: var(--mythic-gradient); color: white; }
.rarity-odds { display: block; font-size: 0.78rem; color: var(--muted); margin: 0.4rem 0 1rem; }
.fortune-text { font-size: 1.15rem; line-height: 1.8; white-space: pre-line; }
.from-line { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; font-style: italic; }
.actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.btn-secondary { background: #F0E6D2; color: var(--brown); border: none; padding: 0.7rem 1.3rem; border-radius: 30px; cursor: pointer; font-size: 0.95rem; transition: background 0.2s; text-decoration: none; display: inline-block; }
.btn-secondary:hover { background: #E2D4B8; }
.btn-secondary.primary { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: white; }
.toggle-send { background: transparent; border: 1px solid var(--gold); color: var(--brown); padding: 0.7rem 1.5rem; border-radius: 30px; cursor: pointer; margin-top: 1rem; transition: all 0.2s; font-size: 0.95rem; }
.toggle-send:hover { background: var(--gold); color: white; }
.send-section { background: white; padding: 1.6rem; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); margin-top: 1.5rem; display: none; }
.send-section h3 { color: var(--brown); margin-bottom: 0.5rem; font-size: 1.1rem; }
.send-note { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.2rem; font-style: italic; }
.send-section input, .send-section select, .send-section textarea { width: 100%; padding: 0.85rem; margin-bottom: 1rem; border: 1px solid #E0D0B8; border-radius: 10px; font-size: 1rem; background: #FFFAF0; font-family: inherit; color: var(--text); }
.send-section input:focus, .send-section select:focus, .send-section textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,165,116,0.2); }
.send-buttons { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.link-result { margin-top: 1rem; padding: 1rem; background: #F8F0E0; border-radius: 10px; word-break: break-all; font-size: 0.85rem; display: none; }
.ad-slot { margin: 1.5rem auto 0; min-height: 0; display: none; }
.ad-slot.on { display: block; min-height: 100px; }
.support { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); }
.support a { color: var(--brown); font-weight: 600; }
footer { margin-top: 2rem; font-size: 0.8rem; color: #B89A6E; line-height: 1.6; }
footer a { color: inherit; }
.hidden { display: none !important; }
