:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #f59e0b;
    --primary-glow: rgba(245, 158, 11, 0.4);
    --gem: #10b981;
    --gem-glow: rgba(16, 185, 129, 0.5);
    --card-bg: rgba(30, 41, 59, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Effects */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(16,185,129,0.2) 0%, rgba(2,6,23,0) 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(56,189,248,0.15) 0%, rgba(2,6,23,0) 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, 10%) scale(0.9); }
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Header */
.header {
    text-align: center;
    animation: fadeUp 1s ease-out forwards;
}

.title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.highlight {
    background: linear-gradient(to right, #fde047, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-muted);
    font-weight: 400;
}

/* Offer Showcase */
.offer-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

@media (min-width: 900px) {
    .offer-showcase {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
    }
}

/* Emotes Grid */
.emotes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    flex: 1;
    max-width: 600px;
}

.emote-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out forwards;
    animation-delay: var(--delay);
}

.emote-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 20px rgba(255,255,255,0.05);
}

.emote-img-placeholder {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.emote-card:hover .emote-img-placeholder {
    transform: scale(1.1) rotate(5deg);
}

.skeleton { color: #e2e8f0; }
.bowler { color: #60a5fa; }
.dragon { color: #f43f5e; }
.goblin { color: #4ade80; }

.emote-name {
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    color: #e2e8f0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Gems Section */
.gems-section {
    background: linear-gradient(145deg, rgba(16,185,129,0.1), rgba(2,6,23,0.8));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 24px;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out forwards;
    animation-delay: var(--delay);
}

.gems-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--gem-glow) 0%, transparent 50%);
    opacity: 0.5;
    pointer-events: none;
    animation: pulseGlow 4s infinite alternate ease-in-out;
}

.gems-image {
    font-size: 6rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 30px var(--gem-glow));
    animation: floatItem 3s infinite ease-in-out alternate;
}

.gems-amount {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    margin-top: 1rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 1;
}

.gems-label {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gem);
    letter-spacing: 4px;
    z-index: 1;
}

/* Checkout Section */
.checkout-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease-out forwards;
    animation-delay: var(--delay);
}

.price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.old-price {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 600;
}

.new-price {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

.cta-button {
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
    border: none;
    border-radius: 50px;
    padding: 1.2rem 4rem;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 800;
    color: #451a03;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4), inset 0 -4px 0 rgba(0,0,0,0.1);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s infinite;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.6), inset 0 -4px 0 rgba(0,0,0,0.1);
}

.cta-button:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4), inset 0 -2px 0 rgba(0,0,0,0.1);
}

.cta-text {
    position: relative;
    z-index: 1;
}

.terms {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatItem {
    0% { transform: translateY(0) rotate(-2deg); }
    100% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0.6; }
}

@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Button States */
.cta-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.cta-button.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    color: #ffffff;
    pointer-events: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-main);
}

.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Form Styles */
.purchase-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.purchase-form label,
.purchase-form input,
.purchase-form .submit-btn {
    flex: 1 1 100%;
}

.purchase-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    margin-top: 0.7rem;
    margin-bottom: -0.2rem;
}

.purchase-form label[for="expiry"],
.purchase-form label[for="cvc"],
.purchase-form input#expiry,
.purchase-form input#cvc {
    flex: 1 1 calc(50% - 0.5rem);
}

.purchase-form input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.purchase-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

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

.submit-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.submit-btn.success {
    background: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 2rem;
    }

    .title {
        font-size: clamp(2.5rem, 10vw, 3rem);
    }

    .emotes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .emote-card {
        padding: 1rem;
        gap: 0.5rem;
    }

    .emote-img-placeholder {
        width: 60px;
        height: 60px;
    }

    .emote-name {
        font-size: 0.85rem;
    }

    .gems-section {
        padding: 2rem 1rem;
        min-width: 100%;
    }

    .gems-image {
        font-size: 4rem;
    }

    .gems-image img {
        width: 80px !important;
    }

    .gems-amount {
        font-size: 3rem;
    }

    .new-price {
        font-size: 3rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1.2rem;
        width: 100%;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
}

@media (max-width: 400px) {
    /* Stack expiry and cvc on extremely narrow screens */
    .purchase-form label[for="expiry"],
    .purchase-form label[for="cvc"],
    .purchase-form input#expiry,
    .purchase-form input#cvc {
        flex: 1 1 100%;
    }
}
