/* ─── Variables (ACTotal Theme) ─── */
:root {
    --bg: #050506;
    --surface: #111827;
    --surface-light: #1f2937;
    
    --accent: #10B981; /* Emerald green for the bottle */
    --accent-glow: rgba(16, 185, 129, 0.3);

    --text: #ffffff;
    --text-dim: #9ca3af;
    --radius: 16px;
    --radius-sm: 8px;
}

/* ─── Base Reset ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* ─── Layout ─── */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: 1.5rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #34D399, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--surface);
    color: var(--text-dim);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all .2s;
}

.btn-icon-subtle {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
}

.btn-icon:hover, .btn-icon-subtle:hover {
    background: var(--surface-light);
    color: var(--text);
    opacity: 1;
}

/* ─── Main Content ─── */
.botella-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    /* Add some perspective for 3D feel if needed later */
    perspective: 1000px;
}

/* ─── Bottle Container & Animation ─── */
.bottle-container {
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    /* Optional: faint circle to mark the area */
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
}

.bottle {
    font-size: 8rem; /* Large emoji size */
    cursor: pointer;
    user-select: none;
    /* 
     Will be manipulated via JS rotateZ. 
     Using a cubic-bezier for a realistic slow-down effect:
     Starts fast, then gradually decelerates to a stop.
    */
    transition: transform 3.5s cubic-bezier(0.15, 0.85, 0.35, 1);
    /* Make sure origin is centered so it spins like a bottle on its side */
    transform-origin: center center;
    /* Filter to give it a slight pop and shadow */
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.5));
    /* If the emoji doesn't naturally look like it's pointing "up" (0 degrees),
       we adjust it. The 🍾 emoji defaults to pointing top-right.
       We rotate it -45deg internally so "0deg" applied from JS points straight UP. */
}

/* ─── Action Button ─── */
.btn-primary {
    width: 100%;
    max-width: 300px;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s, background 0.3s;
    background: linear-gradient(135deg, #34D399, #10B981);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--surface-light);
    box-shadow: none;
    color: var(--text-dim);
}


/* ─── Rules Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 26, .85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    animation: fadeIn .3s ease;
}

.modal-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popUp {
    from { transform: scale(.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    animation: popUp .4s cubic-bezier(.34, 1.56, .64, 1);
}

.rules-content {
    max-width: 400px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.rules-text {
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

.rules-text p {
    margin-bottom: 0.8rem;
}

.rules-text ul {
    margin-left: 1.5rem;
    margin-bottom: 0.8rem;
}

.rules-text li {
    margin-bottom: 0.4rem;
}

.btn-modal-close {
    width: 100%;
    padding: .8rem;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--surface-light);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.btn-modal-close:hover {
    background: rgba(255, 255, 255, .1);
}
