/* ==========================================
   Roblox Style Reward Landing Page CSS
   ========================================== */

/* Variables & Theme */
:root {
    --bg-dark: #070212;
    --modal-bg: #0f0524;
    --gold-glow: #ffe600;
    --gold-glow-rgba: rgba(255, 230, 0, 0.4);
    
    --purple-theme: #a020f0;
    --purple-glow: rgba(160, 32, 240, 0.6);
    
    --red-theme: #ff003c;
    --red-glow: rgba(255, 0, 60, 0.6);
    
    --yellow-theme: #ffbb00;
    --yellow-glow: rgba(255, 187, 0, 0.6);
    
    --btn-green: #00cd3c;
    --btn-green-top: #3bf16c;
    --btn-red: #d6001c;
    --btn-red-top: #ff4760;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #38bdf8;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    user-select: none;
    position: relative;
}

/* Sunburst Rays Background */
.sunburst-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4fc3f7;
    z-index: -1;
}

@keyframes rotateSunburst {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Layout Container */
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    perspective: 1000px;
}

/* ==========================================
   The Reward Modal
   ========================================== */
.reward-modal {
    position: relative;
    background: var(--modal-bg);
    border: 4px solid var(--gold-glow);
    border-radius: 24px;
    width: 520px;
    max-width: 95vw;
    padding: 50px 25px 25px 25px;
    box-shadow: 
        0 0 35px var(--gold-glow-rgba),
        inset 0 0 20px rgba(255, 230, 0, 0.15),
        0 20px 40px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotateX(2deg);
    animation: modalEntrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalEntrance {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(100px) rotateX(15deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(2deg);
    }
}

/* Close Button (X in top right) */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(to bottom, var(--btn-red-top), var(--btn-red));
    border: 3px solid #000000;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    box-shadow: 
        0 4px 0 #000000,
        0 6px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s, box-shadow 0.1s;
    z-index: 10;
}

.close-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 
        0 6px 0 #000000,
        0 8px 12px rgba(0, 0, 0, 0.6);
}

.close-btn:active {
    transform: scale(0.95) translateY(2px);
    box-shadow: 
        0 2px 0 #000000,
        0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   Header Badge: +1 SPEED KEYBOARD ESCAPE
   ========================================== */
.header-badge {
    position: absolute;
    top: -45px;
    background: linear-gradient(135deg, #7b1fa2, #311b92);
    border: 3px solid #df00ff;
    border-radius: 12px;
    padding: 8px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 15px rgba(223, 0, 255, 0.6),
        0 10px 20px rgba(0, 0, 0, 0.5);
    transform: rotate(-1deg);
    z-index: 5;
    animation: floatBadge 3s ease-in-out infinite;
}

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

.badge-text-top {
    font-family: 'Luckiest Guy', cursive;
    font-size: 22px;
    color: #ffffff;
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000,
         0 4px 0px #000000;
    letter-spacing: 1px;
}

.badge-text-middle {
    font-family: 'Luckiest Guy', cursive;
    font-size: 14px;
    color: #ffffff;
    text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000;
    margin-top: -3px;
    letter-spacing: 2px;
}

.badge-text-bottom {
    font-family: 'Luckiest Guy', cursive;
    font-size: 18px;
    color: #00ff66;
    text-shadow: 
        -2px -2px 0 #000,  
         2px -2px 0 #000,
        -2px  2px 0 #000,
         2px  2px 0 #000,
         0 2px 4px rgba(0, 255, 102, 0.4);
    letter-spacing: 1px;
}

/* ==========================================
   Title & Subtitle
   ========================================== */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    margin-bottom: 5px;
}

.modal-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 38px;
    color: #ffffff;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 
        -3px -3px 0 #000,  
         3px -3px 0 #000,
        -3px  3px 0 #000,
         3px  3px 0 #000,
         0 6px 0px #000000;
}

.modal-title .highlight {
    color: #ffe600;
}

.sparkle {
    font-size: 26px;
    color: var(--gold-glow);
    text-shadow: 0 0 10px var(--gold-glow);
    margin: 0 10px;
    animation: pulseSparkle 1.5s infinite alternate;
}

.left-sparkle { animation-delay: 0s; }
.right-sparkle { animation-delay: 0.75s; }

@keyframes pulseSparkle {
    0% { transform: scale(0.8) rotate(0deg); opacity: 0.7; }
    100% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

.subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #dddddd;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

/* ==========================================
   Rewards Cards Grid
   ========================================== */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

/* Base Reward Card Style */
.reward-card {
    background: rgba(10, 3, 25, 0.7);
    border-radius: 16px;
    padding: 6px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.card-inner {
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000;
    position: relative;
    overflow: hidden;
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.reward-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.3s ease;
    transform: scale(1.05);
}

.banner {
    font-family: 'Luckiest Guy', cursive;
    font-size: 16px;
    padding: 12px 8px;
    text-align: center;
    color: #ffffff;
    text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000;
    letter-spacing: 1px;
}

/* Card Selection Status styling */
.reward-card::after {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #00ff66;
    font-size: 20px;
    text-shadow: 0 0 5px rgba(0,0,0,0.8), -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

.reward-card.selected::after {
    opacity: 1;
    transform: scale(1);
}

/* Specific Card Themes */

/* 1. Purple Theme: Infinity Trail */
.reward-card.purple-theme {
    border: 3px solid var(--purple-theme);
    box-shadow: 0 0 10px rgba(160, 32, 240, 0.2);
}
.reward-card.purple-theme.selected {
    box-shadow: 0 0 25px var(--purple-theme), inset 0 0 8px var(--purple-theme);
    animation: pulsePurple 2s infinite alternate;
}
.reward-card.purple-theme .banner {
    background: linear-gradient(to right, #4a00e0, #8e2de2);
    border-top: 2px solid var(--purple-theme);
}

@keyframes pulsePurple {
    0% { box-shadow: 0 0 15px rgba(160, 32, 240, 0.3), inset 0 0 4px rgba(160, 32, 240, 0.2); }
    100% { box-shadow: 0 0 25px rgba(160, 32, 240, 0.8), inset 0 0 12px rgba(160, 32, 240, 0.5); }
}

/* 2. Red Theme: Admin Treadmill */
.reward-card.red-theme {
    border: 3px solid var(--red-theme);
    box-shadow: 0 0 10px rgba(255, 0, 60, 0.2);
}
.reward-card.red-theme.selected {
    box-shadow: 0 0 25px var(--red-theme), inset 0 0 8px var(--red-theme);
    animation: pulseRed 2s infinite alternate;
}
.reward-card.red-theme .banner {
    background: linear-gradient(to right, #b21f1f, #f12711);
    border-top: 2px solid var(--red-theme);
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 15px rgba(255, 0, 60, 0.3), inset 0 0 4px rgba(255, 0, 60, 0.2); }
    100% { box-shadow: 0 0 25px rgba(255, 0, 60, 0.8), inset 0 0 12px rgba(255, 0, 60, 0.5); }
}

/* 3. Yellow Theme: Electric Aura */
.reward-card.yellow-theme {
    border: 3px solid var(--yellow-theme);
    box-shadow: 0 0 10px rgba(255, 187, 0, 0.2);
}
.reward-card.yellow-theme.selected {
    box-shadow: 0 0 25px var(--yellow-theme), inset 0 0 8px var(--yellow-theme);
    animation: pulseYellow 2s infinite alternate;
}
.reward-card.yellow-theme .banner {
    background: linear-gradient(to right, #e65c00, #f9d423);
    border-top: 2px solid var(--yellow-theme);
}

@keyframes pulseYellow {
    0% { box-shadow: 0 0 15px rgba(255, 187, 0, 0.3), inset 0 0 4px rgba(255, 187, 0, 0.2); }
    100% { box-shadow: 0 0 25px rgba(255, 187, 0, 0.8), inset 0 0 12px rgba(255, 187, 0, 0.5); }
}

/* Hover effects */
.reward-card:hover {
    transform: scale(1.05) translateY(-5px);
}
.reward-card:hover .reward-img {
    transform: scale(1.1);
}

/* Deselected state representation */
.reward-card:not(.selected) {
    opacity: 0.65;
    filter: grayscale(40%);
    border-color: #3d3452;
    box-shadow: none;
}
.reward-card:not(.selected) .banner {
    background: #3d3452;
    border-top-color: #4f4369;
}

/* ==========================================
   Actions Buttons
   ========================================== */
.actions-container {
    display: flex;
    gap: 20px;
    width: 100%;
}

.action-btn {
    flex: 1;
    height: 54px;
    border-radius: 12px;
    border: 3px solid #000000;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Luckiest Guy', cursive;
    font-size: 20px;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 
        -1.5px -1.5px 0 #000,  
         1.5px -1.5px 0 #000,
        -1.5px  1.5px 0 #000,
         1.5px  1.5px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

/* Accept (Green) */
.accept-btn {
    background: linear-gradient(to bottom, var(--btn-green-top), var(--btn-green));
    box-shadow: 
        0 5px 0 #000000,
        0 8px 15px rgba(0, 205, 60, 0.4);
}

.accept-btn:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 
        0 7px 0 #000000,
        0 10px 18px rgba(0, 205, 60, 0.5);
}

.accept-btn:active {
    transform: scale(0.97) translateY(4px);
    box-shadow: 
        0 1px 0 #000000,
        0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Cancel (Red) */
.cancel-btn {
    background: linear-gradient(to bottom, var(--btn-red-top), var(--btn-red));
    box-shadow: 
        0 5px 0 #000000,
        0 8px 15px rgba(214, 0, 28, 0.4);
}

.cancel-btn:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 
        0 7px 0 #000000,
        0 10px 18px rgba(214, 0, 28, 0.5);
}

.cancel-btn:active {
    transform: scale(0.97) translateY(4px);
    box-shadow: 
        0 1px 0 #000000,
        0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-icon {
    font-size: 22px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}

/* ==========================================
   Congratulations Modal Overlay
   ========================================== */
.congrats-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 1, 12, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 100;
}

.congrats-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.congrats-card {
    background: #11052c;
    border: 4px solid var(--gold-glow);
    border-radius: 24px;
    padding: 40px;
    width: 500px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 
        0 0 50px rgba(255, 230, 0, 0.3),
        0 20px 45px rgba(0, 0, 0, 0.7);
    transform: scale(0.7) rotate(-2deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.congrats-overlay.active .congrats-card {
    transform: scale(1) rotate(0deg);
}

.congrats-sparkle {
    font-size: 60px;
    margin-bottom: 15px;
    animation: bounceSparkle 1.2s infinite alternate;
}

@keyframes bounceSparkle {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-10px) scale(1.1); }
}

.congrats-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 32px;
    margin-bottom: 15px;
    background: linear-gradient(to bottom, #fffb00, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 0px #000);
}

.congrats-text {
    font-size: 16px;
    line-height: 1.6;
    color: #dddddd;
    margin-bottom: 25px;
}

.claimed-items-preview {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
}

.claimed-item-mini {
    background: rgba(255,255,255,0.05);
    border: 2px solid;
    border-radius: 12px;
    padding: 8px;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.claimed-item-mini img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.congrats-close-btn {
    background: linear-gradient(to bottom, var(--btn-green-top), var(--btn-green));
    border: 3px solid #000000;
    border-radius: 12px;
    color: white;
    font-family: 'Luckiest Guy', cursive;
    font-size: 22px;
    padding: 10px 40px;
    cursor: pointer;
    box-shadow: 
        0 5px 0 #000,
        0 8px 15px rgba(0,205,60,0.4);
    text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000;
    transition: transform 0.15s, box-shadow 0.15s;
}

.congrats-close-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 
        0 7px 0 #000,
        0 10px 18px rgba(0,205,60,0.5);
}

.congrats-close-btn:active {
    transform: scale(0.95) translateY(4px);
    box-shadow: 
        0 1px 0 #000,
        0 2px 4px rgba(0,0,0,0.4);
}

/* Responsive adjustments */
@media (max-width: 620px) {
    .reward-modal {
        padding: 40px 15px 20px 15px;
    }
    
    .modal-title {
        font-size: 28px;
    }
    
    .header-badge {
        padding: 6px 16px;
        top: -38px;
    }
    
    .badge-text-top { font-size: 18px; }
    .badge-text-bottom { font-size: 14px; }
    
    .rewards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-height: 45vh;
        overflow-y: auto;
        padding-right: 5px;
    }
    
    .reward-card {
        padding: 4px;
    }
    
    .actions-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-btn {
        width: 100%;
        height: 48px;
    }
}
