/* One file for digital_store: the parts that used to be separate files follow in their old order, each in its old layer. */
@layer global, layout, components, overrides;


/* ==== variables.css ==== */
:root {
    /* Brand Colors */
    --ds-brand: #6E0D25;
    --ds-gold-light: #f4c542;
    --ds-gold-text: #f4d03f;

    /* Backgrounds */
    --ds-premium-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --ds-thumbnail-bg: linear-gradient(135deg, #0f3b3a 0%, #4b2e20 100%);
    --ds-banner-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --ds-cup-bg: linear-gradient(135deg, #1a1a0a 0%, #2e1f00 100%);
    --ds-pro-bg: linear-gradient(135deg, #1a0a00 0%, #2e1500 100%);
    --ds-demo-bg: linear-gradient(135deg, #001a0a 0%, #002e14 100%);
    --ds-original-bg: linear-gradient(135deg, #0e001a 0%, #1e0030 100%);

    /* Text Colors */

    /* Card */
    --ds-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --ds-card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.2);
    --ds-card-radius: 10px;
}

/* ==== global.css (layer global) ==== */
@layer global {
.header, .container, body {
    text-align: center;
}
}

/* ==== layout.css (layer layout) ==== */
@layer layout {
.container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 4px 0;
    padding: 10px;
    box-sizing: border-box;
}

.section-header {
    display: inline-block;
    background: linear-gradient(135deg, var(--ds-gold-light) 0%, var(--accent-gold) 50%, var(--ds-gold-light) 100%);
    color: var(--ds-brand);
    padding: 0 24px;
    border-radius: 8px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
    margin: 0 auto 8px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35),
        0 -2px 4px rgba(0, 0, 0, 0.45);
}

.premium-section {
    background: var(--ds-premium-bg);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.premium-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.premium-grid .game-card {
    width: 200px;
    flex: 0 0 200px;
}

.premium-info p {
    margin: 5px 0;
}

.cup-section {
    background: var(--ds-cup-bg);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.cup-grid .game-card {
    width: 200px;
    flex: 0 0 200px;
}

.type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.type-grid .game-card {
    width: 200px;
    flex: 0 0 200px;
}

.games-grid a.game-card-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 4px;
    }
    .premium-section,
    .cup-section,
    .pro-section,
    .demo-section,
    .original-section {
        padding: 6px;
    }
    .premium-grid,
    .cup-grid,
    .type-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .premium-grid .game-card,
    .cup-grid .game-card,
    .type-grid .game-card {
        width: 100%;
    }
}
}

/* ==== components/buttons.css (layer components) ==== */
@layer components {
/* Pricing Card */
.pricing-card {
    background: var(--ds-premium-bg);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--surface);
}

.pricing-header {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ds-gold-text);
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.pricing-includes {
    font-size: 0.875rem;
    color: rgba(255,255,255,.7);
    margin-bottom: 12px;
    line-height: 1.4;
}

.pricing-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.pricing-period {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,.6);
}

.pricing-divider {
    color: rgba(255,255,255,.25);
    font-weight: 300;
    margin: 0 4px;
}

.pricing-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pricing-actions form {
    width: 100%;
    max-width: 280px;
}

.pricing-btn {
    display: block;
    width: 100%;
    max-width: 280px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: opacity .15s;
}

.pricing-btn:hover {
    opacity: 0.9;
}

.pricing-btn--primary {
    background: linear-gradient(135deg, var(--ds-gold-light), var(--accent-gold));
    color: var(--dark-bg);
}

.pricing-btn--secondary {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.2);
}

.pricing-status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.pricing-status--trial {
    background: transparent;
    border: 1px solid #9ca3af;
    color: #9ca3af;
}

/* Gold, because a pass in hand is the state the whole card is about. */
.pricing-status--active {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--ds-gold-text);
}

.pricing-link {
    display: inline-block;
    padding: 6px 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--surface);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .pricing-card {
        padding: 16px 8px;
        margin-bottom: 12px;
    }
    .pricing-header { font-size: 1.3rem; }
    .pricing-price { font-size: 2rem; margin-bottom: 12px; }
    .pricing-includes { font-size: 0.875rem; }
    .pricing-btn { padding: 10px 16px; font-size: 0.875rem; }
}

.button_cup {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--ds-thumbnail-bg);
    color: var(--ds-gold-text);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite;
}

.button_cup::before {
    content: '\1F3C6';
    margin-right: 0.5rem;
}

.button_cup:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--ds-gold-text), var(--accent-gold));
    color: var(--dark-bg);
}

.button_cup:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(212, 175, 55, 0.8);
    }
}
}

/* ==== components/cards.css (layer components) ==== */
@layer components {
.game-card {
    background: var(--surface);
    border-radius: var(--ds-card-radius);
    overflow: hidden;
    box-shadow: var(--ds-card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ds-card-shadow-hover);
}

/* Locked is a colour, not a weakness. The card wears the same dark ground
   and gold edge as the Paid tag pinned to it, so a pass-less visitor sees a
   product they do not own yet — not a faded copy of one they do. */
.game-card-locked {
    background: var(--dark-bg);
    border: 1px solid var(--accent-gold);
}

.game-card-locked .game-info h3 {
    color: var(--ds-gold-text);
}

.game-card-locked .game-info p {
    color: var(--surface);
}

.game-thumbnail {
    width: 100%;
    height: 200px;
    background: var(--ds-thumbnail-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.no-image {
    font-size: 64px;
    color: var(--surface);
}

.game-info {
    padding: 6px;
}

.game-info h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: var(--text-main);
}

.game-info p {
    margin: 0 0 10px 0;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.cup-badge {
    background: linear-gradient(135deg, var(--danger), var(--danger));
    color: var(--surface);
}

/* Mobile */
@media (max-width: 480px) {
    .game-thumbnail {
        height: 150px;
    }
    .game-thumbnail img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    .game-info h3 {
        font-size: 16px;
    }
    .game-info p {
        font-size: 14px;
    }
}
}

/* ==== components/banner.css (layer components) ==== */
@layer components {
/* Banner wrapper */
.cup-banner-link {
    text-decoration: none;
    display: block;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1px;
}

/* Banner container */
.cup-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 2rem;
    gap: 0.75rem;
    background: var(--ds-banner-bg);
    border: 3px solid transparent;
    border-radius: 16px;
    background-clip: padding-box;
    position: relative;
    box-sizing: border-box;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Gradient border effect */
.cup-banner::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 16px;
    padding: 3px;
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffa500);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.8;
    z-index: -1;
}

/* Cup emoji */
.cup-emoji {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Text container */
.cup-banner-text {
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Title */
.cup-banner-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 800;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: 0.04em;
    color: #ffd700;
    text-transform: uppercase;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.4);
    line-height: 1.1;
}

/* Subtitle */
.cup-banner-sub {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    font-weight: 500;
    color: #ffed4e;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

/* Focus state for accessibility */
.cup-banner-link:focus {
    outline: none;
}
}
