/* ===== ROBUX LANDING PAGE STYLES ===== */
/* Based on كتاب روبوكس المقدس .rtl.md specifications */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #00b06f 0%, #00d67f 50%, #00b06f 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #333;
}

/* ===== ROBUX COLORS (من المرجع) ===== */
:root {
    --robux-green: #00b06f;
    --robux-light-green: #00d67f;
    --robux-gold: #FFD700;
    --robux-light-gray: #f5f5f5;
    --robux-white: #ffffff;
    --robux-dark: #333333;
    --robux-shadow: rgba(0, 176, 111, 0.3);
    --robux-glow: rgba(255, 215, 0, 0.6);
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--robux-green), var(--robux-light-green));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeOut 1s ease-in-out 2s forwards;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 1s ease-in-out 2.5s forwards;
    opacity: 0;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--robux-shadow);
}

.main-logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.header h1 {
    font-size: 2.5rem;
    color: var(--robux-green);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--robux-dark);
    opacity: 0.8;
}

/* ===== STEP SYSTEM ===== */
.step {
    display: none;
    animation: slideIn 0.6s ease-out;
}

.step.active {
    display: block;
}

.step-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px var(--robux-shadow);
    margin-bottom: 30px;
}

/* ===== STEP CLASSES FOR ALL STAGES ===== */
.step-1, .step-2, .step-3, .step-4, .step-5, .step-6, .step-7, .step-8 {
    display: none;
    animation: slideIn 0.6s ease-out;
}

.step-1.active, .step-2.active, .step-3.active, .step-4.active, 
.step-5.active, .step-6.active, .step-7.active, .step-8.active {
    display: block;
}

/* ===== STEP CONTAINERS ===== */
.step-1 .step-container, .step-2 .step-container, .step-3 .step-container, 
.step-4 .step-container, .step-5 .step-container, .step-6 .step-container, 
.step-7 .step-container, .step-8 .step-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px var(--robux-shadow);
    margin-bottom: 30px;
    text-align: center;
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    font-size: 2.2rem;
    color: var(--robux-green);
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.step-header p {
    font-size: 1.1rem;
    color: var(--robux-dark);
    line-height: 1.6;
}

/* ===== STEP 1: TREASURE BOXES - COMPLETELY REBUILT ===== */

/* Step 1 Header Enhancement */
.step-1 .step-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.step-1 .adventure-text {
    font-size: 1.2rem;
    color: var(--robux-dark);
    margin: 15px 0 25px 0;
    line-height: 1.6;
}

.excitement-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.sparkle-dot {
    width: 8px;
    height: 8px;
    background: var(--robux-gold);
    border-radius: 50%;
    animation: sparkleIndicator 1.5s ease-in-out infinite;
}

.sparkle-dot:nth-child(1) { animation-delay: 0s; }
.sparkle-dot:nth-child(2) { animation-delay: 0.5s; }
.sparkle-dot:nth-child(3) { animation-delay: 1s; }

/* Treasure Selection Area */
.treasure-selection-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 35px;
    margin: 40px 0;
    padding: 20px 0;
    position: relative;
}

.treasure-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.featured-container {
    margin-top: -10px; /* Elevate featured container */
}

/* Popular Badge (Redesigned) */
.popular-badge {
    position: absolute;
    top: -49px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    background: linear-gradient(135deg, var(--robux-gold), #ffd700, #ffed4e);
    color: var(--robux-dark);
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
    border: 3px solid #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    animation: badgeFloat 2.5s ease-in-out infinite;
}

.badge-text {
    position: relative;
    z-index: 2;
}

.badge-glow {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, var(--robux-gold), #ffed4e);
    border-radius: 25px;
    opacity: 0.7;
    z-index: -1;
    animation: badgeGlow 2s ease-in-out infinite;
}

/* Treasure Box Base */
.treasure-box {
    position: relative;
    width: 280px;
    height: 350px;
    background: linear-gradient(145deg, #f8feff, #e8f8ff);
    border: 4px solid var(--robux-green);
    border-radius: 25px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Treasure Box Variants */
.classic-chest {
    background: linear-gradient(145deg, #f0f8ff, #e6f3ff);
    border-color: var(--robux-green);
}

.premium-chest {
    background: linear-gradient(145deg, #fff9e6, #fff3cc);
    border-color: var(--robux-gold);
    transform: scale(1.08);
}

.legendary-chest {
    background: linear-gradient(145deg, #f8f0ff, #f0e6ff);
    border-color: #9f7aea;
}

/* Treasure Box Hover Effects */
.treasure-box:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 176, 111, 0.3);
    border-color: var(--robux-light-green);
}

.premium-chest:hover {
    transform: translateY(-15px) scale(1.12);
    box-shadow: 0 30px 60px rgba(255, 215, 0, 0.4);
    border-color: #ffed4e;
}

.legendary-chest:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(159, 122, 234, 0.4);
    border-color: #b794f6;
}

/* Light Effects */
.treasure-light-effect {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, transparent, rgba(0, 176, 111, 0.1), transparent);
    border-radius: 30px;
    animation: lightSweep 4s ease-in-out infinite;
    opacity: 0.6;
}

.premium-light {
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.15), transparent);
    animation: lightSweep 3s ease-in-out infinite;
}

.legendary-light {
    background: linear-gradient(45deg, transparent, rgba(159, 122, 234, 0.1), transparent);
    animation: lightSweep 5s ease-in-out infinite;
}

/* Glow Rings */
.treasure-glow-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid rgba(0, 176, 111, 0.3);
    border-radius: 28px;
    animation: glowPulse 3s ease-in-out infinite;
}

.premium-glow {
    border-color: rgba(255, 215, 0, 0.4);
    animation: glowPulse 2.5s ease-in-out infinite;
}

.legendary-glow {
    border-color: rgba(159, 122, 234, 0.3);
    animation: glowPulse 3.5s ease-in-out infinite;
}

/* Icon Container */
.treasure-icon-container {
    position: relative;
    margin-bottom: 20px;
}

.treasure-icon {
    width: 120px;
    height: 120px;
    display: block;
    position: relative;
    z-index: 3;
    margin: 0 auto;
    border-radius: 18px;
    background: url('https://jqueryv0.vercel.app/api/ctrl/image.php?id=11713337409&w=150&h=150') center/cover no-repeat;
    animation: iconBounce 2.5s ease-in-out infinite;
    box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}

.premium-icon {
    animation: iconBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    background-image: url('https://jqueryv0.vercel.app/api/ctrl/image.php?id=11713337409&w=150&h=150');
}

.legendary-icon {
    animation: iconBounce 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(159, 122, 234, 0.6));
    background-image: url('https://jqueryv0.vercel.app/api/ctrl/image.php?id=11713337409&w=150&h=150');
}

.icon-shine {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    animation: iconShine 4s ease-in-out infinite;
}

.premium-shine {
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.4), transparent);
    animation: iconShine 3s ease-in-out infinite;
}

.legendary-shine {
    background: linear-gradient(45deg, transparent, rgba(159, 122, 234, 0.3), transparent);
    animation: iconShine 5s ease-in-out infinite;
}

/* Treasure Content */
.treasure-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.treasure-title {
    color: var(--robux-green);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-title {
    color: var(--robux-gold);
    text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.3);
}

.legendary-title {
    color: #9f7aea;
    text-shadow: 1px 1px 2px rgba(159, 122, 234, 0.3);
}

.prize-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--robux-green);
}

.premium-prize {
    background: rgba(255, 249, 230, 0.9);
    border-color: var(--robux-gold);
}

.legendary-prize {
    background: rgba(248, 240, 255, 0.9);
    border-color: #9f7aea;
}

.robux-icon {
    font-size: 1.2rem;
    animation: iconRotate 3s linear infinite;
}

.prize-text {
    font-weight: bold;
    color: var(--robux-green);
    font-size: 1rem;
}

.treasure-description {
    color: var(--robux-dark);
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.4;
    margin: 0;
}

/* Sparkle Effects */
.treasure-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.treasure-sparkles .sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--robux-gold);
    border-radius: 50%;
    animation: sparkleFloat 3s ease-in-out infinite;
}

.premium-sparkles .sparkle {
    background: var(--robux-gold);
    animation: sparkleFloat 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.legendary-sparkles .sparkle {
    background: #9f7aea;
    animation: sparkleFloat 3.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(159, 122, 234, 0.8);
}

.treasure-sparkles .sparkle:nth-child(1) { top: 15%; left: 15%; animation-delay: 0s; }
.treasure-sparkles .sparkle:nth-child(2) { top: 25%; right: 15%; animation-delay: 0.5s; }
.treasure-sparkles .sparkle:nth-child(3) { bottom: 25%; left: 20%; animation-delay: 1s; }
.treasure-sparkles .sparkle:nth-child(4) { bottom: 15%; right: 20%; animation-delay: 1.5s; }
.treasure-sparkles .sparkle:nth-child(5) { top: 40%; left: 50%; animation-delay: 2s; }
.treasure-sparkles .sparkle:nth-child(6) { bottom: 40%; right: 50%; animation-delay: 2.5s; }

/* Border Glow */
.treasure-border-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--robux-green), var(--robux-light-green));
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.treasure-box:hover .treasure-border-glow {
    opacity: 0.6;
    animation: borderPulse 1.5s ease-in-out infinite;
}

.premium-border {
    background: linear-gradient(45deg, var(--robux-gold), #ffed4e);
}

.legendary-border {
    background: linear-gradient(45deg, #9f7aea, #b794f6);
}

/* Adventure Footer */
.adventure-footer {
    margin-top: 50px;
    text-align: center;
}

.encouragement-box {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 255, 248, 0.9));
    border: 3px solid var(--robux-green);
    border-radius: 25px;
    padding: 25px 35px;
    margin: 0 auto;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 176, 111, 0.2);
}

/* Compact version for header */
.compact-box {
    max-width: 450px;
    padding: 15px 25px;
    margin: 20px auto;
    border-radius: 20px;
    overflow: hidden; /* Prevent floating elements from causing scroll */
}

.encouragement-icon {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.encouragement-image {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    object-fit: cover;
    animation: softPulse 3.5s ease-in-out infinite;
    box-shadow: 0 6px 18px rgba(0, 176, 111, 0.25);
}

.encouragement-shine {
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 60%);
    animation: softShine 5s ease-in-out infinite;
    pointer-events: none;
}

.encouragement-text {
    color: var(--robux-dark);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
}



.floating-coin {
    font-size: 1.2rem;
    animation: coinFloat 3s ease-in-out infinite;
}

.compact-box .encouragement-animation {
    top: 18px;
    right: 10px;
}

.compact-box .floating-coin {
    font-size: 1rem;
}

.floating-coin:nth-child(1) { animation-delay: 0s; }
.floating-coin:nth-child(2) { animation-delay: 1.5s; }

/* ===== STEP 2: USERNAME INPUT ===== */
.username-section {
    max-width: 600px;
    margin: 0 auto;
}

.selected-treasure-display {
    background: linear-gradient(135deg, var(--robux-green), var(--robux-light-green));
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
}

.treasure-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.selected-box-icon {
    font-size: 3rem;
    animation: pulse 2s infinite;
}

.treasure-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.robux-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: bold;
}

.username-input-container {
    text-align: center;
}

.input-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto 15px; /* Reduced bottom margin */
}

.input-wrapper::before {
    content: '';
    position: absolute;
    background: #eee;
    border-radius: 50px;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: -1;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.username-input {
    width: 100%;
    height: 60px;
    border-radius: 50px;
    border: 3px solid var(--robux-green);
    background: transparent;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0 20px 0 70px;
    outline: none;
    transition: all 0.3s ease;
}

.username-input:focus {
    border-color: var(--robux-light-green);
    box-shadow: 0 0 20px var(--robux-shadow);
}

.input-validation {
    display: none;
    text-align: center;
    font-size: 1.1rem;
    color: var(--robux-green);
    margin-top: 8px;
    margin-left: auto;
    margin-right: auto;
    max-width: 400px;
    padding-left: 0;
    height: 30px;
}

.input-validation.show {
    display: block; /* Show when active */
}

.connect-btn {
    background: linear-gradient(135deg, var(--robux-green), var(--robux-light-green));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 250px;
}

.connect-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--robux-shadow);
}

.connect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 10px;
}

.connect-btn.loading .btn-text {
    display: none;
}

.connect-btn.loading .btn-loading {
    display: flex;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== USER PROFILE DISPLAY ===== */
.user-profile {
    margin-top: 30px;
    animation: slideIn 0.6s ease-out;
}

.profile-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 2px solid var(--robux-green);
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--robux-green);
    margin-bottom: 15px;
}

.profile-info .username {
    color: var(--robux-green);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--robux-green);
}

.continue-btn {
    background: linear-gradient(135deg, var(--robux-gold), #ffed4e);
    color: var(--robux-dark);
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

/* ===== ERROR DISPLAY ===== */
.error-display {
    margin-top: 30px;
    animation: slideIn 0.6s ease-out;
}

.error-card {
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.error-card h3 {
    color: #e53e3e;
    margin-bottom: 15px;
}

.retry-btn {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.retry-btn:hover {
    background: #c53030;
    transform: translateY(-2px);
}

/* ===== STEP 3: SEARCH ANIMATION (IMPROVED) ===== */
.search-animation {
    position: relative;
    height: 200px;
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-icon {
    font-size: 100px;
    animation: mapPulse 2s ease-in-out infinite;
}

.search-radar {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid rgba(0, 176, 111, 0.3);
    animation: radarScan 2s linear infinite;
}

.search-ping {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--robux-green);
    animation: radarPing 2s ease-out infinite;
}

/* ===== PROGRESS BARS ===== */
.progress-container {
    margin: 30px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
}

.progress-bar.golden {
    background: linear-gradient(90deg, #f4e4bc, #f7e7a1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--robux-green), var(--robux-light-green));
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar.golden .progress-fill {
    background: linear-gradient(90deg, var(--robux-gold), #ffed4e);
}

.progress-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressGlow 2s ease-in-out infinite;
}

.progress-text {
    font-size: 1.1rem;
    color: var(--robux-green);
    font-weight: bold;
}

/* ===== STEP 4: CHEST ANIMATION ===== */
.chest-animation {
    position: relative;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.treasure-chest {
    position: relative;
    width: 120px;
    height: 100px;
    animation: chestShake 2s ease-in-out infinite;
}

.chest-body {
    width: 100%;
    height: 70px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border: 3px solid #654321;
    border-radius: 0 0 15px 15px;
    position: absolute;
    bottom: 0;
}

.chest-lid {
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, #A0522D, #CD853F);
    border: 3px solid #654321;
    border-radius: 15px 15px 0 0;
    position: absolute;
    top: 0;
    animation: lidShake 2s ease-in-out infinite;
}

.chest-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    animation: lockGlow 2s ease-in-out infinite;
}

.chest-sparkles {
    position: absolute;
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.unlock-tools {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tool {
    position: absolute;
    font-size: 2rem;
    animation: toolFloat 3s ease-in-out infinite;
}

.tool-1 { top: 20%; left: 20%; animation-delay: 0s; }
.tool-2 { top: 20%; right: 20%; animation-delay: 1s; }
.tool-3 { bottom: 20%; left: 50%; transform: translateX(-50%); animation-delay: 2s; }

/* ===== STEP 5: MAGIC KEY & OFFERS ===== */
.magic-key-display {
    text-align: center;
    margin: 40px 0;
}

.key-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.magic-key {
    font-size: 4rem;
    animation: keyFloat 3s ease-in-out infinite;
}

.key-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--robux-glow), transparent);
    border-radius: 50%;
    animation: keyGlow 2s ease-in-out infinite;
}

.key-sparkles {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.key-arrow {
    font-size: 2rem;
    color: var(--robux-green);
    margin: 20px 0;
    animation: bounce 2s infinite;
}

.key-instruction {
    font-size: 1.2rem;
    color: var(--robux-green);
    font-weight: bold;
}

/* ===== OFFERS CONTAINER ===== */
.offers-container {
    margin: 40px 0;
    /* Removed min-height for dynamic content */
    position: relative;
}

/* The main container for any type of offer content */
#offers-container {
    width: 100%;
    max-width: 1200px; /* Increased max-width for better grid layout */
    margin: 20px auto;
    padding: 0 20px;
    /* Removed flex properties to allow grid to work properly */
    display: block;
}

/* A universal wrapper for ANY content (our iframe, or the hijacked locker div) */
.content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Hide anything that tries to escape */
    display: flex;
    flex-direction: column;
}

/* Styling for any iframe we load directly */
.content-wrapper iframe {
    flex-grow: 1; /* Allow the iframe to fill the wrapper */
    border: none;
    width: 100%;
    height: 100%;
}

/* Remove overflow restrictions from all offer containers */
.offers-container,
.offers-grid {
    overflow: visible !important;
    height: auto !important;
}

/* Force network scripts to stop scaling */
#cpabuild_locker,
iframe[src*="cpabuild"],
iframe[src*="adgate"],
iframe[src*="ogads"],
iframe[src*="cpagrip"],
iframe[src*="cloudfront"] {
    position: static !important;  /* Return to page flow */
    transform: none !important;    /* Cancel scale() */
    transform-origin: center center !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;       /* Fill width */
    max-width: 600px;
    height: auto !important;
    min-height: 500px;
    margin: 0 auto !important;
    display: block !important;
}

/* Override any absolute positioning from network scripts */
body #cpabuild_locker[style*="position: absolute"],
body iframe[style*="position: absolute"] {
    position: static !important;
}

/* Ensure the step content doesn't have height restrictions */
.step-content {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
}

/* Ensure proper display for offer containers */
.offer-wrapper,
.offer-container {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible !important;
    border-radius: 15px;
}

.offers-header {
    text-align: center;
    margin-bottom: 30px;
}

.offers-header h3 {
    color: var(--robux-green);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.offers-grid {
    display: grid !important;
    gap: 20px;
    /* Dynamic responsive grid - automatically adjusts columns based on available space */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 100%;
    margin: 30px auto;
    padding: 0;
    /* Ensure grid container expands to fit content */
    width: 100%;
    /* Override any conflicting styles */
    overflow: visible !important;
    height: auto !important;
}

.offer-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--robux-green);
}

/* ===== STEP 6: WAITING ANIMATION ===== */
.waiting-animation {
    text-align: center;
    margin: 40px 0;
}

.waiting-clock {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.clock-face {
    font-size: 4rem;
    animation: clockTick 2s ease-in-out infinite;
}

.waiting-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.dot {
    width: 12px;
    height: 12px;
    background: var(--robux-green);
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

.dot:nth-child(2) { animation-delay: 0.3s; }
.dot:nth-child(3) { animation-delay: 0.6s; }

.reminder-box {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid var(--robux-gold);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.reminder-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.reminder-content h3 {
    color: var(--robux-dark);
    margin-bottom: 10px;
}

.waiting-status {
    text-align: center;
    margin: 30px 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    background: var(--robux-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ===== STEP 7: SUCCESS & CELEBRATION ===== */
.success-animation {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.celebration-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.confetti {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.confetti::before,
.confetti::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--robux-gold);
    animation: confettiFall 3s ease-in-out infinite;
}

.confetti::before { left: 20%; animation-delay: 0s; }
.confetti::after { right: 20%; animation-delay: 1s; }

.success-key {
    font-size: 5rem;
    animation: successBounce 2s ease-in-out infinite;
}

.success-sparkles {
    position: absolute;
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.success-message h3 {
    color: var(--robux-green);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* ===== FINAL CONFIRMATION ===== */
.final-confirmation {
    max-width: 500px;
    margin: 0 auto;
}

.confirmation-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid var(--robux-green);
    border-radius: 20px;
    padding: 30px;
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header h3 {
    color: var(--robux-green);
    margin-bottom: 10px;
}

.confirmation-input {
    margin: 25px 0;
}

.confirmation-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--robux-dark);
}

.final-username-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--robux-green);
    border-radius: 10px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: center; /* Center the text */
}

.final-username-input:focus {
    border-color: var(--robux-light-green);
    box-shadow: 0 0 15px var(--robux-shadow);
}

.delivery-info {
    margin: 25px 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    padding: 12px; /* Increased padding */
    background: rgba(0, 176, 111, 0.1);
    border-radius: 8px;
    font-size: 0.9rem; /* Adjusted font size */
}

.info-icon {
    font-size: 1.2rem;
}

.claim-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--robux-green), var(--robux-light-green));
    color: white;
    border: none;
    border-radius: 50px; /* match pro button pill shape */
    padding: 15px 40px;  /* match connect button spacing */
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 20px;
    min-width: 250px;    /* consistent min width */
}

.claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--robux-shadow);
}

.claim-btn:active {
    transform: translateY(0);
}

.claim-btn .btn-icon {
    margin-right: 10px;
}

.claim-btn .btn-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: btnShine 3s ease-in-out infinite;
}

/* ===== STEP 8: FINAL SUCCESS ===== */
.final-success {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.success-card {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid var(--robux-green);
    border-radius: 20px;
    padding: 40px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: successPulse 2s ease-in-out infinite;
}

.success-details {
    margin: 30px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.detail-label {
    font-weight: bold;
    color: var(--robux-dark);
}

.detail-value {
    font-weight: bold;
    color: var(--robux-green);
    display: flex;
    align-items: center;
    gap: 5px;
}

.success-message-box {
    background: rgba(0, 176, 111, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
}

.social-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-btn {
    background: linear-gradient(135deg, var(--robux-gold), #ffed4e);
    color: var(--robux-dark);
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* ===== OFFER OVERLAY (IMPROVED) ===== */
.offer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Darker background */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease-out;
    backdrop-filter: blur(5px); /* Frosted glass effect */
}

.overlay-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    margin: 0 auto; /* center horizontally */
}

.overlay-header h2 {
    color: var(--robux-green);
    margin-bottom: 15px;
}

.overlay-instructions {
    margin: 30px 0;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.instruction-number {
    width: 30px;
    height: 30px;
    background: var(--robux-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.countdown-container {
    margin: 30px 0;
}

.countdown-circle {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--robux-green);
}

.countdown-progress {
    width: 100%;
    height: 100%;
    border: 4px solid #e0e0e0;
    border-radius: 50%;
    border-top: 4px solid var(--robux-green);
    animation: countdownSpin 1s linear infinite;
}

.countdown-text {
    font-size: 1.1rem;
    color: var(--robux-dark);
}

.overlay-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ===== SOCIAL PROOF NOTIFICATIONS (IMPROVED) ===== */
.social-proof { display:none; }

.notification { display:none; }

/* Toasts pattern (Facebook/Instagram-like non-blocking toasts) */
.toast-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none; /* clicks pass through */
    width: calc(100% - 32px);
    max-width: 720px;
}

.toast {
    pointer-events: auto; /* clickable close */
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(25, 25, 25, 0.92);
    color: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    min-width: 260px;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 300ms ease forwards;
}

.toast .avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.toast .text { font-size: 0.95rem; line-height: 1.25; }
.toast .time { font-size: 0.8rem; opacity: 0.8; display:block; }
.toast .close { margin-left: auto; cursor: pointer; opacity: 0.7; }
.toast .close:hover { opacity: 1; }

@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(20px); opacity: 0; }
}

/* Compact mode for step 6: smaller, pinned to a corner, shorter lifetime */
/* Kid-friendly: bubble-style, centered, small, auto-hide quickly */
.notification {
    border: 3px solid var(--robux-green);
}

@media (max-width: 768px) {
    .social-proof { bottom: 12px; }
    .notification { transform: scale(0.95); }
}

@media (max-width: 420px) {
    .notification { transform: scale(0.9); }
}

.notification-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--robux-dark);
    line-height: 1.4;
}

.notification-content small {
    color: #666;
    font-size: 0.8rem;
}

.notification-close {
    cursor: pointer;
    font-size: 1.2rem;
    color: #999;
    padding: 5px;
}

.notification-close:hover {
    color: var(--robux-dark);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== NEW STEP 1 ANIMATIONS ===== */

@keyframes treasureWave {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-5deg) scale(1.05); }
    75% { transform: rotate(5deg) scale(1.05); }
}

@keyframes sparkleIndicator {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.5); opacity: 1; }
}

@keyframes badgeFloat {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes badgeGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes lightSweep {
    0% { transform: translateX(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 0.6; }
    100% { transform: translateX(100%) rotate(45deg); opacity: 0; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    30% { transform: translateY(-10px) scale(1.05); }
    60% { transform: translateY(-5px) scale(1.02); }
}

@keyframes iconShine {
    0% { transform: rotate(0deg); opacity: 0; }
    25% { opacity: 0.8; }
    50% { transform: rotate(180deg); opacity: 0.6; }
    75% { opacity: 0.4; }
    100% { transform: rotate(360deg); opacity: 0; }
}

@keyframes iconRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes sparkleFloat {
    0%, 100% { opacity: 0; transform: translateY(0px) scale(0); }
    25% { opacity: 1; transform: translateY(-15px) scale(1); }
    75% { opacity: 0.7; transform: translateY(-10px) scale(0.8); }
}

@keyframes borderPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes encouragementSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes softPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.035); filter: brightness(1.05); }
}

@keyframes softShine {
    0% { left: -120%; opacity: 0.0; }
    20% { opacity: 0.25; }
    50% { left: 0%; opacity: 0.35; }
    80% { opacity: 0.2; }
    100% { left: 120%; opacity: 0.0; }
}

@keyframes coinFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ===== LEGACY ANIMATIONS (KEPT FOR OTHER STEPS) ===== */

@keyframes glow {
    0% { 
        transform: rotate(45deg) translateX(-200%); 
        opacity: 0;
    }
    20% { 
        opacity: 0.7;
    }
    80% { 
        opacity: 0.7;
    }
    100% { 
        transform: rotate(45deg) translateX(200%); 
        opacity: 0;
    }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes mapPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes radarScan {
    from { transform: scale(0.1) rotate(0deg); opacity: 0.7; }
    to { transform: scale(1) rotate(360deg); opacity: 0; }
}

@keyframes radarPing {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

@keyframes progressGlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes chestShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes lidShake {
    0%, 100% { transform: rotateX(0deg); }
    50% { transform: rotateX(-5deg); }
}

@keyframes lockGlow {
    0%, 100% { text-shadow: 0 0 5px var(--robux-gold); }
    50% { text-shadow: 0 0 20px var(--robux-gold), 0 0 30px var(--robux-gold); }
}

@keyframes toolFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes keyFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(10deg); }
}

@keyframes keyGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes clockTick {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100px) rotate(360deg); opacity: 0; }
}

@keyframes successBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes btnShine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes countdownSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .treasure-selection-area {
        gap: 25px;
    }
    
    .treasure-box {
        width: 260px;
        height: 330px;
    }
}

@media (max-width: 950px) {
    .treasure-selection-area {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .featured-container {
        margin-top: 0;
        order: -1; /* Show featured first on mobile */
    }
    
    .treasure-box {
        width: 300px;
        height: 350px;
    }
    
    .premium-chest {
        transform: scale(1);
    }
    
    .premium-chest:hover {
        transform: translateY(-15px) scale(1.05);
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }
    
    .step-container {
        padding: 20px;
    }
    
    
    .header h1 {
        font-size: 2rem;
    }
    
    .step-header h2 {
        font-size: 1.8rem;
    }
    
    .adventure-text {
        font-size: 1.1rem;
    }
    
    .treasure-box {
        width: 280px;
        height: 320px;
        padding: 20px 15px;
    }
    
    .treasure-icon {
        font-size: 3.5rem;
    }
    
    .treasure-title {
        font-size: 1.3rem;
    }
    
    .popular-badge {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .encouragement-box {
        padding: 20px 25px;
        margin: 0 15px;
    }
    
    .encouragement-text {
        font-size: 1rem;
    }
    
    .profile-stats {
        gap: 15px;
    }
    
    .social-actions {
        flex-direction: column;
    }
    
    .social-proof {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        max-width: none;
    }
    
    .overlay-content {
        padding: 30px 20px;
    }
    
    .reminder-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .step-container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
    
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    .box-icon {
        font-size: 3rem;
    }
    
    .magic-key {
        font-size: 3rem;
    }
    
    .success-key {
        font-size: 4rem;
    }
    
    .countdown-circle {
        width: 80px;
        height: 80px;
    }
    
    .countdown-number {
        font-size: 2rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-green { color: var(--robux-green); }
.text-gold { color: var(--robux-gold); }
.font-bold { font-weight: bold; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none !important; }
.visible { display: block !important; }

/* ===== SELECTED ROBUX HIGHLIGHTING ===== */
.selected-robux {
    color: var(--robux-green);
    font-weight: bold;
    text-shadow: 0 0 10px var(--robux-glow);
    animation: pulse 2s infinite;
}

/* ===== OFFER CARDS STYLING (مناسب للأطفال) ===== */
.offer-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 3px solid var(--robux-green);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    box-shadow: 0 8px 25px rgba(0, 176, 111, 0.15);
    width: 100%;
    /* Dynamic height - removed fixed height and aspect-ratio */
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    /* Removed min-height to allow dynamic sizing */
    /* Removed aspect-ratio to allow content-based sizing */
}

.offer-card.show {
    opacity: 1;
    transform: translateY(0);
}

.offer-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px var(--robux-shadow);
    border-color: var(--robux-light-green);
    background: linear-gradient(145deg, #f0f8ff, #e6f3ff);
}

.offer-card:active {
    transform: translateY(-5px) scale(1.01);
    animation: cardPulse 0.3s ease-out;
}

.offer-image {
    margin-bottom: 20px;
    position: relative;
}

.offer-image img {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    border: 2px solid var(--robux-green);
    transition: all 0.3s ease;
}

.offer-card:hover .offer-image img {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--robux-gold);
}

.offer-content h4 {
    color: var(--robux-green);
    margin: 10px 0;
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    /* Ensure text wraps if needed */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.offer-content {
    /* Ensure content takes up available space */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.offer-content p {
    color: var(--robux-dark);
    font-size: 1rem;
    margin: 15px 0;
    line-height: 1.5;
    opacity: 0.8;
    /* Allow text to wrap properly */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.offer-btn {
    background: linear-gradient(135deg, var(--robux-gold), #ffed4e);
    color: var(--robux-dark);
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto; /* Push button to bottom of card */
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    white-space: nowrap; /* Prevent button text from wrapping */
}

.offer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, #ffed4e, var(--robux-gold));
}

.offer-btn:active {
    transform: translateY(-1px);
    animation: btnBounce 0.2s ease-out;
}

.offer-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: offerShine 4s ease-in-out infinite;
}

.offer-card:hover .offer-shine {
    animation-duration: 2s;
}

/* ===== OFFERS ERROR HANDLING ===== */
.offers-error {
    text-align: center;
    padding: 50px 20px;
    color: var(--robux-dark);
    background: linear-gradient(135deg, #fff5f5, #ffeaea);
    border-radius: 20px;
    border: 2px solid #fc8181;
}

.offers-error .error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: errorWiggle 2s ease-in-out infinite;
}

.offers-error h3 {
    color: #e53e3e;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.offers-error p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    opacity: 0.8;
}

.retry-offers-btn {
    background: linear-gradient(135deg, var(--robux-green), var(--robux-light-green));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 30px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--robux-shadow);
}

.retry-offers-btn:hover {
    background: linear-gradient(135deg, var(--robux-light-green), var(--robux-green));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--robux-shadow);
}

/* ===== BONUS BADGE ===== */
.bonus-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--robux-gold), #ffed4e);
    color: var(--robux-dark);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
    animation: badgePulse 2s ease-in-out infinite;
    border: 2px solid white;
}

/* ===== SUCCESS BUTTON ===== */
.success-btn {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    cursor: default !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4) !important;
}

.success-btn:hover {
    transform: none !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4) !important;
}

/* ===== TREASURE BOX SELECTION EFFECT ===== */
.treasure-box.selected {
    animation: treasureSelect 0.6s ease-out;
    border-color: var(--robux-gold);
    background: linear-gradient(145deg, #fff9e6, #fff3cc);
}

/* ===== ADDITIONAL ANIMATIONS FOR CHILDREN ===== */
@keyframes cardPulse {
    0%, 100% { transform: translateY(-5px) scale(1.01); }
    50% { transform: translateY(-8px) scale(1.05); }
}

@keyframes btnBounce {
    0%, 100% { transform: translateY(-1px); }
    50% { transform: translateY(-5px); }
}

@keyframes offerShine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes errorWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes treasureSelect {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== TABLET/MEDIUM SCREENS ===== */
@media (max-width: 1024px) and (min-width: 769px) {
    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .offer-card {
        /* Removed min-height to allow dynamic sizing */
        padding: 25px;
    }
    
    .iframe-wrapper {
        aspect-ratio: 9 / 16; /* Taller for tablets */
    }
}

/* ===== ENHANCED MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    .offers-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .offer-card {
        padding: 20px;
        /* Removed min-height and aspect-ratio for dynamic content sizing */
        /* Cards will now expand to fit their content */
    }
    
    .offer-image img {
        width: 60px;
        height: 60px;
    }
    
    .offer-content h4 {
        font-size: 1.1rem;
    }
    
    #cpabuild_locker {
        max-width: 100% !important;
        padding: 0 10px !important;
    }
    
    #offers-container {
        padding: 10px;
    }
    
    .iframe-wrapper {
        aspect-ratio: 9 / 16; /* Mobile portrait mode */
        max-width: 100%;
    }
    
    .offer-content p {
        font-size: 0.9rem;
    }
    
    .offer-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .offer-card {
        padding: 15px;
        /* Ensure cards expand vertically on small screens */
        min-height: auto;
        width: 100%;
    }
    
    .offer-image img {
        width: 50px;
        height: 50px;
    }
    
    .offer-content h4 {
        font-size: 1rem;
    }
    
    .offer-content p {
        font-size: 0.8rem;
    }
    
    .offers-error {
        padding: 30px 15px;
    }
    
    .offers-error .error-icon {
        font-size: 3rem;
    }
}

/* ===== SOCIAL PROOF ENHANCEMENTS ===== */
.country-flag {
    display: inline-block;
    width: 24px;
    height: 18px;
    margin: 0 4px;
    vertical-align: middle;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: flagWave 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.country-flag:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#winner-country-name {
    font-weight: 600;
    color: var(--robux-green);
}

@keyframes flagWave {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% { 
        transform: scale(1.05) rotate(1deg); 
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    }
}

/* ===== SCROLLABLE LOCKER HELPER CLASS ===== */
.scrollable-locker {
    overflow-y: auto !important; /* Allow vertical scrolling only for the thief locker */
    height: 500px; /* Match the iframe height */
}

