/**
 * Frequency Fountain Page v2.0 - POLISHED UI
 * 
 * v2.0 Changes:
 * - Side-by-side claim buttons (black bg, gold border)
 * - 2-column balance grid on desktop
 * - Hidden section dividers
 * - Smaller fountain (320x380)
 * - Fixed class name mismatch (ffp-balances-grid)
 * 
 * Standalone page styling for the Frequency Fountain rewards system
 * Features:
 * - Dark-gold pulsating gradient background
 * - Elegant animated golden fountain with water
 * - Stacked golden coins around fountain
 * - Three states: Not logged in, Not eligible, Eligible
 * - FIXED: Proper centering on desktop (Astra theme override)
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --ffp-gold: #d4af37;
    --ffp-gold-light: #f4d03f;
    --ffp-gold-dark: #996515;
    --ffp-gold-shine: #ffe066;
    --ffp-bronze: #cd7f32;
    --ffp-bg-dark: #0a0805;
    --ffp-bg-card: rgba(20, 18, 15, 0.9);
    --ffp-text-primary: #fff8e7;
    --ffp-text-secondary: #b8a88a;
    --ffp-text-muted: #7a6f5c;
    --ffp-border: rgba(212, 175, 55, 0.3);
    --ffp-success: #4ade80;
    --ffp-error: #ef4444;
    --ffp-water: #5ba3c0;
    --ffp-water-light: #7ec8e3;
    --ffp-water-dark: #3d7a94;
    --ffp-water-glow: rgba(91, 163, 192, 0.4);
}

/* ============================================
   ASTRA THEME OVERRIDES - CRITICAL FOR CENTERING
   ============================================ */
body.page-template-page-frequency-fountain,
body[class*="frequency-fountain"] {
    background: #0a0805 !important;
}

/* Override Astra's container constraints */
body.page-template-page-frequency-fountain .site-content,
body.page-template-page-frequency-fountain #content,
body.page-template-page-frequency-fountain .ast-container,
body.page-template-page-frequency-fountain .site-main,
body.page-template-page-frequency-fountain article,
body.page-template-page-frequency-fountain .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hide Astra sidebar if present */
body.page-template-page-frequency-fountain #secondary,
body.page-template-page-frequency-fountain .sidebar {
    display: none !important;
}

/* ============================================
   PAGE CONTAINER
   ============================================ */
.ffp-page {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding: 100px 20px 60px;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.ffp-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.ffp-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 20%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 80% 80%, rgba(153, 101, 21, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 80% at 20% 70%, rgba(244, 208, 63, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #0a0805 0%, #12100a 50%, #0a0805 100%);
    animation: ffp-gradient-pulse 8s ease-in-out infinite;
}

@keyframes ffp-gradient-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* Floating glow orbs */
.ffp-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: ffp-orb-float 12s ease-in-out infinite;
}

.ffp-glow-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(212, 175, 55, 0.12);
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.ffp-glow-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(153, 101, 21, 0.1);
    top: 60%;
    right: 15%;
    animation-delay: -4s;
}

.ffp-glow-orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(244, 208, 63, 0.08);
    bottom: 20%;
    left: 10%;
    animation-delay: -8s;
}

@keyframes ffp-orb-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-20px, -40px) scale(0.95);
    }
    75% {
        transform: translate(-40px, 10px) scale(1.02);
    }
}

/* Floating particles */
.ffp-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ffp-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--ffp-gold);
    border-radius: 50%;
    opacity: 0;
    animation: ffp-particle-float 8s ease-in-out infinite;
}

@keyframes ffp-particle-float {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.3);
    }
    25% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
        transform: translateY(-150px) scale(1);
    }
    75% {
        opacity: 0.4;
    }
}

/* ============================================
   MAIN CONTAINER - CENTERED
   ============================================ */
.ffp-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================
   HEADER
   ============================================ */
.ffp-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.ffp-title {
    font-family: 'Cinzel Decorative', 'Cinzel', 'Times New Roman', serif;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    color: transparent;
    background: linear-gradient(180deg, var(--ffp-gold-shine) 0%, var(--ffp-gold) 40%, var(--ffp-gold-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin: 0 0 10px 0;
    letter-spacing: 3px;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.ffp-title-icon {
    font-size: 0.85em;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
}

.ffp-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--ffp-text-secondary);
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* ============================================
   FOUNTAIN SECTION
   ============================================ */
.ffp-fountain-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    width: 100%;
}

.ffp-fountain-wrapper {
    position: relative;
    width: 320px;
    height: 380px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ffp-fountain {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ffp-fountain-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.6));
    z-index: 2;
}

/* ============================================
   WATER ANIMATION
   ============================================ */
.ffp-water-flow {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 200px;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}

.ffp-water-stream {
    position: absolute;
    width: 4px;
    background: linear-gradient(180deg, 
        rgba(126, 200, 227, 0.9) 0%,
        rgba(91, 163, 192, 0.7) 50%,
        rgba(61, 122, 148, 0.3) 100%);
    border-radius: 2px;
    animation: ffp-water-fall 1.5s ease-in infinite;
    left: 50%;
    transform: translateX(-50%);
}

.ffp-water-stream:nth-child(1) { animation-delay: 0s; left: 30%; }
.ffp-water-stream:nth-child(2) { animation-delay: 0.2s; left: 40%; }
.ffp-water-stream:nth-child(3) { animation-delay: 0.1s; left: 50%; }
.ffp-water-stream:nth-child(4) { animation-delay: 0.3s; left: 60%; }
.ffp-water-stream:nth-child(5) { animation-delay: 0.15s; left: 70%; }

@keyframes ffp-water-fall {
    0% {
        height: 0;
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        height: 80px;
        opacity: 0.6;
    }
    100% {
        height: 0;
        top: 150px;
        opacity: 0;
    }
}

/* Water droplets */
.ffp-water-droplet {
    position: absolute;
    width: 8px;
    height: 12px;
    background: radial-gradient(ellipse at 30% 30%, 
        rgba(126, 200, 227, 0.9) 0%,
        rgba(91, 163, 192, 0.6) 60%,
        rgba(61, 122, 148, 0.3) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: ffp-droplet-fall 2s ease-in infinite;
    filter: blur(0.5px);
}

@keyframes ffp-droplet-fall {
    0% {
        top: 50px;
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 0.8;
        transform: scale(1) rotate(10deg);
    }
    80% {
        opacity: 0.5;
        transform: scale(0.8) rotate(-5deg);
    }
    100% {
        top: 280px;
        opacity: 0;
        transform: scale(0.3) rotate(15deg);
    }
}

.ffp-water-droplet:nth-child(1) { left: 25%; animation-delay: 0s; animation-duration: 1.8s; }
.ffp-water-droplet:nth-child(2) { left: 35%; animation-delay: 0.3s; animation-duration: 2.1s; }
.ffp-water-droplet:nth-child(3) { left: 45%; animation-delay: 0.6s; animation-duration: 1.9s; }
.ffp-water-droplet:nth-child(4) { left: 55%; animation-delay: 0.15s; animation-duration: 2.2s; }
.ffp-water-droplet:nth-child(5) { left: 65%; animation-delay: 0.45s; animation-duration: 2s; }
.ffp-water-droplet:nth-child(6) { left: 75%; animation-delay: 0.75s; animation-duration: 1.7s; }
.ffp-water-droplet:nth-child(7) { left: 30%; animation-delay: 0.9s; animation-duration: 2.3s; }
.ffp-water-droplet:nth-child(8) { left: 70%; animation-delay: 1.1s; animation-duration: 1.95s; }

/* Water splash effect at basin */
.ffp-water-splash {
    position: absolute;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    z-index: 4;
}

.ffp-splash-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(126, 200, 227, 0.7);
    border-radius: 50%;
    animation: ffp-splash 1.2s ease-out infinite;
}

@keyframes ffp-splash {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--splash-x, 20px), var(--splash-y, -30px)) scale(0.3);
        opacity: 0;
    }
}

.ffp-splash-particle:nth-child(1) { left: 40%; --splash-x: -25px; --splash-y: -20px; animation-delay: 0s; }
.ffp-splash-particle:nth-child(2) { left: 45%; --splash-x: -15px; --splash-y: -35px; animation-delay: 0.1s; }
.ffp-splash-particle:nth-child(3) { left: 50%; --splash-x: 0px; --splash-y: -40px; animation-delay: 0.05s; }
.ffp-splash-particle:nth-child(4) { left: 55%; --splash-x: 15px; --splash-y: -35px; animation-delay: 0.15s; }
.ffp-splash-particle:nth-child(5) { left: 60%; --splash-x: 25px; --splash-y: -20px; animation-delay: 0.08s; }
.ffp-splash-particle:nth-child(6) { left: 42%; --splash-x: -20px; --splash-y: -25px; animation-delay: 0.2s; }
.ffp-splash-particle:nth-child(7) { left: 58%; --splash-x: 20px; --splash-y: -28px; animation-delay: 0.18s; }

/* ============================================
   GROUND COINS
   ============================================ */
.ffp-ground-coins {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    height: 80px;
    z-index: 1;
}

.ffp-ground-coin {
    position: absolute;
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: ffp-coin-shimmer 4s ease-in-out infinite;
}

@keyframes ffp-coin-shimmer {
    0%, 100% {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.4)) brightness(1.2);
    }
}

/* ============================================
   STATUS CARDS
   ============================================ */
.ffp-status-card {
    background: var(--ffp-bg-card);
    border: 1px solid var(--ffp-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.ffp-status-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.ffp-status-title {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 1.5rem;
    color: var(--ffp-gold);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.ffp-status-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--ffp-text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */
.ffp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ffp-btn-primary {
    background: linear-gradient(135deg, var(--ffp-gold) 0%, var(--ffp-gold-dark) 100%);
    color: #0a0805;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.ffp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--ffp-gold-light) 0%, var(--ffp-gold) 100%);
}

.ffp-btn-secondary {
    background: transparent;
    color: var(--ffp-gold);
    border: 2px solid var(--ffp-gold);
}

.ffp-btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   ELIGIBLE STATE
   ============================================ */
.ffp-eligible-content {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Rewards Display */
.ffp-rewards-highlight {
    background: linear-gradient(135deg, rgba(20, 18, 15, 0.95) 0%, rgba(30, 27, 22, 0.95) 100%);
    border: 2px solid var(--ffp-gold);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ffp-rewards-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--ffp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
}

.ffp-rewards-amount {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 3rem;
    font-weight: 700;
    color: transparent;
    background: linear-gradient(180deg, var(--ffp-gold-shine) 0%, var(--ffp-gold) 50%, var(--ffp-gold-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin: 0;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.ffp-rewards-unit {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--ffp-gold);
    margin-left: 5px;
}

.ffp-boost-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

/* Claim Buttons Section - v2.0: Side by side */
.ffp-claim-section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.ffp-claim-section form {
    flex: 1;
    min-width: 250px;
    max-width: 320px;
}

.ffp-claim-form {
    margin: 0;
}

/* v2.0: Black background with gold border */
.ffp-btn-claim {
    width: 100%;
    padding: 18px 24px;
    font-size: 1rem;
    background: #0a0805;
    color: var(--ffp-gold);
    border: 2px solid var(--ffp-gold);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    animation: ffp-claim-pulse 2.5s ease-in-out infinite;
}

@keyframes ffp-claim-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.3), inset 0 0 20px rgba(212, 175, 55, 0.05);
    }
    50% {
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), inset 0 0 30px rgba(212, 175, 55, 0.1);
    }
}

.ffp-btn-claim:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
}

.ffp-btn-claim:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

.ffp-btn-ad-revenue {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.ffp-btn-ad-revenue:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    box-shadow: 0 6px 30px rgba(79, 70, 229, 0.5);
}

/* Timer Section */
.ffp-timer-section {
    background: rgba(15, 13, 10, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.ffp-timer-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: var(--ffp-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 10px 0;
}

.ffp-timer-value {
    font-family: 'Cinzel', monospace;
    font-size: 2rem;
    color: var(--ffp-gold);
    margin: 0;
    letter-spacing: 3px;
}

/* v2.0: Balances Section Container */
.ffp-balances-section {
    background: rgba(20, 18, 15, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ffp-balances-header {
    text-align: center;
    margin-bottom: 5px;
}

.ffp-balances-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--ffp-gold);
    margin: 0;
}

.ffp-balances-icon {
    font-size: 1.2rem;
}

/* Balance Grid - v2.0: 2 columns, fixed class name */
.ffp-balances-grid,
.ffp-balance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* v2.0: Hide section dividers */
.ffp-balance-divider {
    display: none;
}

.ffp-balance-item {
    background: rgba(10, 8, 5, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 18px 15px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.ffp-balance-item:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(20, 18, 15, 0.85);
    transform: translateY(-2px);
}

.ffp-balance-item.ffp-balance-main,
.ffp-balance-item.ffp-balance-primary {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.35);
}

/* Balance icon */
.ffp-balance-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* Balance info container */
.ffp-balance-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ffp-balance-value {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff8e7;
    margin: 0;
}

.ffp-balance-primary .ffp-balance-value {
    font-size: 1.6rem;
    color: var(--ffp-gold-light);
}

.ffp-value-gold {
    color: var(--ffp-gold-shine);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.ffp-balance-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    color: var(--ffp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Refresh Section and Button - v2.0 */
.ffp-refresh-section {
    text-align: center;
    margin-bottom: 15px;
}

.ffp-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: var(--ffp-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ffp-refresh-btn:hover {
    border-color: var(--ffp-gold);
    color: var(--ffp-gold);
    background: rgba(212, 175, 55, 0.05);
}

.ffp-refresh-btn svg {
    width: 16px;
    height: 16px;
}

/* Refresh Link (legacy) */
.ffp-refresh-link {
    display: block;
    text-align: center;
    color: var(--ffp-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ffp-refresh-link:hover {
    color: var(--ffp-gold);
}

/* ============================================
   ERROR/SUCCESS MESSAGES
   ============================================ */
.ffp-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ffp-message-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.ffp-message-success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #86efac;
}

/* ============================================
   DEBUG BOX
   ============================================ */
.ffp-debug {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-top: 30px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #0f0;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
}

.ffp-debug h4 {
    color: #ff0;
    margin: 0 0 10px 0;
    font-size: 1rem;
}

.ffp-debug pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================
   RESPONSIVE DESIGN - v2.0 Updated
   ============================================ */
@media (max-width: 768px) {
    .ffp-page {
        padding: 55px 0 20px 0;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Center the container - THIS IS THE KEY FIX */
    .ffp-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Header centered */
    .ffp-header {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 0.5rem;
    }
    
    .ffp-title {
        justify-content: center;
        text-align: center;
        font-size: 1.4rem;
        margin-bottom: 0.25rem;
    }
    
    .ffp-subtitle {
        text-align: center;
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
    
    /* Fountain section - CENTERED */
    .ffp-fountain-section {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 0 auto 0.5rem auto;
        padding: 0;
    }
    
    /* Fountain wrapper - CENTERED with specific width */
    .ffp-fountain-wrapper {
        width: 90vw;
        max-width: 380px;
        height: 55vh;
        min-height: 380px;
        max-height: 500px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .ffp-fountain {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .ffp-fountain-svg {
        display: block;
        width: auto;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: 0 auto;
    }
    
    .ffp-ground-coins,
    .ffp-coins-ground {
        width: 95vw;
        max-width: 400px;
        margin: -30px auto 0 auto;
        display: flex;
        justify-content: center;
    }
    
    /* v2.0: Stack claim buttons on mobile */
    .ffp-claim-section {
        flex-direction: column;
        align-items: center;
        width: calc(100% - 20px);
        max-width: 380px;
        margin: 0 auto;
    }
    
    .ffp-claim-section form {
        width: 100%;
        max-width: 100%;
    }
    
    /* v2.0: Single column balance grid on tablet */
    .ffp-balances-grid,
    .ffp-balance-grid {
        grid-template-columns: 1fr;
    }
    
    .ffp-balance-item.ffp-balance-main,
    .ffp-balance-item.ffp-balance-primary {
        grid-column: span 1;
    }
    
    .ffp-rewards-amount {
        font-size: 1.75rem;
    }
    
    .ffp-status-card {
        padding: 10px 15px;
        margin: 0 auto;
        width: calc(100% - 20px);
        max-width: 380px;
    }
    
    .ffp-balances-section {
        width: calc(100% - 20px);
        max-width: 380px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .ffp-page {
        padding: 50px 0 10px 0;
    }
    
    .ffp-title {
        font-size: 1.25rem;
    }
    
    .ffp-subtitle {
        font-size: 0.6rem;
        margin-bottom: 0.15rem;
    }
    
    /* Still fills screen on small phones */
    .ffp-fountain-wrapper {
        height: 50vh;
        min-height: 350px;
        max-height: 480px;
    }
    
    .ffp-ground-coins,
    .ffp-coins-ground {
        margin-top: -35px;
    }
    
    .ffp-balances-grid,
    .ffp-balance-grid {
        grid-template-columns: 1fr;
    }
    
    .ffp-balance-item {
        padding: 15px 12px;
        min-height: 85px;
    }
    
    .ffp-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .ffp-btn-claim {
        padding: 15px 18px;
        font-size: 0.9rem;
    }
    
    .ffp-balances-section {
        padding: 18px 15px;
    }
    
    .ffp-status-card {
        padding: 10px;
    }
    
    .ffp-rewards-amount {
        font-size: 1.5rem;
    }
}

/* ============================================
   PARTICLE POSITIONS (Generated)
   ============================================ */
.ffp-particle:nth-child(1) { left: 5%; top: 80%; animation-delay: 0s; }
.ffp-particle:nth-child(2) { left: 15%; top: 70%; animation-delay: 0.5s; }
.ffp-particle:nth-child(3) { left: 25%; top: 90%; animation-delay: 1s; }
.ffp-particle:nth-child(4) { left: 35%; top: 75%; animation-delay: 1.5s; }
.ffp-particle:nth-child(5) { left: 45%; top: 85%; animation-delay: 2s; }
.ffp-particle:nth-child(6) { left: 55%; top: 78%; animation-delay: 2.5s; }
.ffp-particle:nth-child(7) { left: 65%; top: 88%; animation-delay: 3s; }
.ffp-particle:nth-child(8) { left: 75%; top: 72%; animation-delay: 3.5s; }
.ffp-particle:nth-child(9) { left: 85%; top: 82%; animation-delay: 4s; }
.ffp-particle:nth-child(10) { left: 95%; top: 76%; animation-delay: 4.5s; }
.ffp-particle:nth-child(11) { left: 10%; top: 65%; animation-delay: 5s; }
.ffp-particle:nth-child(12) { left: 20%; top: 95%; animation-delay: 5.5s; }
.ffp-particle:nth-child(13) { left: 30%; top: 68%; animation-delay: 6s; }
.ffp-particle:nth-child(14) { left: 40%; top: 92%; animation-delay: 6.5s; }
.ffp-particle:nth-child(15) { left: 50%; top: 70%; animation-delay: 7s; }
.ffp-particle:nth-child(16) { left: 60%; top: 86%; animation-delay: 7.5s; }
.ffp-particle:nth-child(17) { left: 70%; top: 74%; animation-delay: 0.25s; }
.ffp-particle:nth-child(18) { left: 80%; top: 90%; animation-delay: 0.75s; }
.ffp-particle:nth-child(19) { left: 90%; top: 68%; animation-delay: 1.25s; }
.ffp-particle:nth-child(20) { left: 8%; top: 88%; animation-delay: 1.75s; }
.ffp-particle:nth-child(21) { left: 18%; top: 76%; animation-delay: 2.25s; }
.ffp-particle:nth-child(22) { left: 28%; top: 84%; animation-delay: 2.75s; }
.ffp-particle:nth-child(23) { left: 38%; top: 66%; animation-delay: 3.25s; }
.ffp-particle:nth-child(24) { left: 48%; top: 94%; animation-delay: 3.75s; }
.ffp-particle:nth-child(25) { left: 58%; top: 72%; animation-delay: 4.25s; }
.ffp-particle:nth-child(26) { left: 68%; top: 80%; animation-delay: 4.75s; }
.ffp-particle:nth-child(27) { left: 78%; top: 86%; animation-delay: 5.25s; }
.ffp-particle:nth-child(28) { left: 88%; top: 74%; animation-delay: 5.75s; }
.ffp-particle:nth-child(29) { left: 12%; top: 82%; animation-delay: 6.25s; }
.ffp-particle:nth-child(30) { left: 22%; top: 78%; animation-delay: 6.75s; }
.ffp-particle:nth-child(31) { left: 32%; top: 88%; animation-delay: 7.25s; }
.ffp-particle:nth-child(32) { left: 42%; top: 70%; animation-delay: 7.75s; }
.ffp-particle:nth-child(33) { left: 52%; top: 92%; animation-delay: 0.4s; }
.ffp-particle:nth-child(34) { left: 62%; top: 68%; animation-delay: 0.9s; }
.ffp-particle:nth-child(35) { left: 72%; top: 84%; animation-delay: 1.4s; }
.ffp-particle:nth-child(36) { left: 82%; top: 72%; animation-delay: 1.9s; }
.ffp-particle:nth-child(37) { left: 92%; top: 86%; animation-delay: 2.4s; }
.ffp-particle:nth-child(38) { left: 6%; top: 74%; animation-delay: 2.9s; }
.ffp-particle:nth-child(39) { left: 16%; top: 90%; animation-delay: 3.4s; }
.ffp-particle:nth-child(40) { left: 26%; top: 66%; animation-delay: 3.9s; }

/* ============================================
   COIN POSITIONS (Generated)
   ============================================ */
.ffp-ground-coin:nth-child(1) { left: 5%; bottom: 5px; font-size: 18px; }
.ffp-ground-coin:nth-child(2) { left: 12%; bottom: 8px; font-size: 22px; animation-delay: 0.3s; }
.ffp-ground-coin:nth-child(3) { left: 20%; bottom: 3px; font-size: 20px; animation-delay: 0.6s; }
.ffp-ground-coin:nth-child(4) { left: 28%; bottom: 10px; font-size: 24px; animation-delay: 0.9s; }
.ffp-ground-coin:nth-child(5) { left: 35%; bottom: 5px; font-size: 19px; animation-delay: 1.2s; }
.ffp-ground-coin:nth-child(6) { left: 42%; bottom: 12px; font-size: 23px; animation-delay: 1.5s; }
.ffp-ground-coin:nth-child(7) { left: 48%; bottom: 6px; font-size: 21px; animation-delay: 1.8s; }
.ffp-ground-coin:nth-child(8) { left: 55%; bottom: 9px; font-size: 22px; animation-delay: 2.1s; }
.ffp-ground-coin:nth-child(9) { left: 62%; bottom: 4px; font-size: 18px; animation-delay: 2.4s; }
.ffp-ground-coin:nth-child(10) { left: 68%; bottom: 11px; font-size: 24px; animation-delay: 2.7s; }
.ffp-ground-coin:nth-child(11) { left: 75%; bottom: 7px; font-size: 20px; animation-delay: 3s; }
.ffp-ground-coin:nth-child(12) { left: 82%; bottom: 3px; font-size: 19px; animation-delay: 3.3s; }
.ffp-ground-coin:nth-child(13) { left: 88%; bottom: 8px; font-size: 21px; animation-delay: 3.6s; }
.ffp-ground-coin:nth-child(14) { left: 95%; bottom: 5px; font-size: 17px; animation-delay: 3.9s; }
.ffp-ground-coin:nth-child(15) { left: 8%; bottom: 25px; font-size: 16px; animation-delay: 0.15s; }
.ffp-ground-coin:nth-child(16) { left: 16%; bottom: 28px; font-size: 20px; animation-delay: 0.45s; }
.ffp-ground-coin:nth-child(17) { left: 24%; bottom: 22px; font-size: 18px; animation-delay: 0.75s; }
.ffp-ground-coin:nth-child(18) { left: 32%; bottom: 30px; font-size: 22px; animation-delay: 1.05s; }
.ffp-ground-coin:nth-child(19) { left: 40%; bottom: 26px; font-size: 19px; animation-delay: 1.35s; }
.ffp-ground-coin:nth-child(20) { left: 50%; bottom: 24px; font-size: 21px; animation-delay: 1.65s; }
.ffp-ground-coin:nth-child(21) { left: 58%; bottom: 29px; font-size: 20px; animation-delay: 1.95s; }
.ffp-ground-coin:nth-child(22) { left: 66%; bottom: 23px; font-size: 18px; animation-delay: 2.25s; }
.ffp-ground-coin:nth-child(23) { left: 74%; bottom: 27px; font-size: 22px; animation-delay: 2.55s; }
.ffp-ground-coin:nth-child(24) { left: 80%; bottom: 25px; font-size: 17px; animation-delay: 2.85s; }
.ffp-ground-coin:nth-child(25) { left: 90%; bottom: 22px; font-size: 19px; animation-delay: 3.15s; }
.ffp-ground-coin:nth-child(26) { left: 15%; bottom: 45px; font-size: 15px; animation-delay: 0.2s; }
.ffp-ground-coin:nth-child(27) { left: 30%; bottom: 48px; font-size: 18px; animation-delay: 0.5s; }
.ffp-ground-coin:nth-child(28) { left: 45%; bottom: 42px; font-size: 16px; animation-delay: 0.8s; }
.ffp-ground-coin:nth-child(29) { left: 55%; bottom: 50px; font-size: 19px; animation-delay: 1.1s; }
.ffp-ground-coin:nth-child(30) { left: 70%; bottom: 44px; font-size: 17px; animation-delay: 1.4s; }
.ffp-ground-coin:nth-child(31) { left: 85%; bottom: 46px; font-size: 16px; animation-delay: 1.7s; }
.ffp-ground-coin:nth-child(32) { left: 25%; bottom: 60px; font-size: 14px; animation-delay: 0.35s; }
.ffp-ground-coin:nth-child(33) { left: 50%; bottom: 62px; font-size: 15px; animation-delay: 0.65s; }
.ffp-ground-coin:nth-child(34) { left: 75%; bottom: 58px; font-size: 14px; animation-delay: 0.95s; }
.ffp-ground-coin:nth-child(35) { left: 38%; bottom: 55px; font-size: 16px; animation-delay: 1.25s; }