/* 🎴 Card Base Styles - Option C Component */
/* All base card styling with ROUNDED CORNERS */

/* ============================================
   TRANSITION SPEED SYSTEM - Seshat's 3-Level Pattern
   ============================================ */
:root {
    /* 3-Level Transition System - PERFECT VALUES by Arhmagos (Massiveness & Premium Feelings!) */
    --transition-fast: 0.6s ease-in-out;
    /* For transform - weighty, luxurious movement */
    --transition-normal: 0.8s ease-in-out;
    /* For opacity, box-shadow - smooth premium */
    --transition-slow: 0.8s ease-in-out;
    /* For large animations - dramatic effects */
}

/* ============================================
   CUSTOM FONT - SAOUI (FIXED PATH)
   ============================================ */
@font-face {
    font-family: 'SAOUI';
    src: url('../fonts/SAOUI-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   CONTROLS PANEL
   ============================================ */

.controls-panel {
    background: rgba(100, 200, 255, 0.1);
    border: 2px solid rgba(100, 200, 255, 0.3);
    border-radius: 15px;
    padding: 12px;
    margin-bottom: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.controls-panel h3 {
    color: #4ade80;
    font-size: 1em;
}

.btn-export {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4ade80, #10b981);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 222, 128, 0.5);
}

.export-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4ade80, #10b981);
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.5);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.export-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.control-group {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(100, 200, 255, 0.2);
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    color: #a0a0ff;
    font-size: 0.8em;
}

.control-value {
    color: #ffd700;
    font-weight: bold;
    font-family: monospace;
    font-size: 0.85em;
}

.control-group input[type="range"] {
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: rgba(100, 200, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64c8ff, #ff64dc);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(100, 200, 255, 0.5);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64c8ff, #ff64dc);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(100, 200, 255, 0.5);
}

.preset-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.preset-btn {
    padding: 5px 10px;
    background: rgba(100, 200, 255, 0.2);
    border: 1px solid rgba(100, 200, 255, 0.4);
    border-radius: 6px;
    color: #64c8ff;
    cursor: pointer;
    font-size: 0.75em;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    background: rgba(100, 200, 255, 0.3);
    transform: translateY(-2px);
}

.preset-btn.active {
    background: linear-gradient(135deg, #64c8ff, #ff64dc);
    color: white;
    border-color: transparent;
}

/* ============================================
   CARD BASE - ROUNDED CORNERS!
   ============================================ */

.holo-card {
    width: 100%;
    min-width: 525px;
    max-width: 555px;
    margin: 0 auto;
    border-radius: var(--radius-card);
    /* 24px - ROUNDED! */
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;

    /* SESHAT'S 3-LEVEL TRANSITION SYSTEM - Different speeds for different properties! */
    transition:
        transform var(--transition-normal),
        /* 0.3s - SMOOTH return when mouse leaves! */
        box-shadow var(--transition-fast),
        /* 0.2s - Instant visual feedback */
        opacity var(--transition-fast);
    /* 0.2s - Instant fade effects */

    will-change: auto;
    /* Let browser manage composite layers for video playback */

    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 17px;

    /* TRANSPARENT background - allows holofoil effect to show through! */
    background: transparent;

    /* Solid border */
    border: 3px solid var(--tier-border-mid);
}

/* DISABLED: Gradient border using pseudo-element - CONFLICTS with tier holographic effects!
   Using solid border instead (line 194)
.holo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-card);
    padding: 3px;
    background: linear-gradient(45deg,
        var(--tier-border-light),
        var(--tier-border-mid),
        var(--tier-border-dark));
    -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;
    pointer-events: none;
    z-index: -1;
}
*/

.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
            var(--tier-glow-primary),
            transparent 70%);
    pointer-events: none;
    z-index: -2;
    /* Behind holographic effect */
}

.opacity-control-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at var(--mx) var(--my),
            rgba(26, 26, 58, 0) 0%,
            rgba(26, 26, 58, calc(0.3 * var(--opacity-layer-strength))) 60%,
            rgba(26, 26, 58, calc(0.5 * var(--opacity-layer-strength))) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    /* 0.3s - Smooth fade */
}

.holo-card:hover .opacity-control-layer {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 10;
    /* High z-index to sit on top of holographic background */
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    flex: 1;
    /* FLEXBOX PHASE: Fill remaining card height */
}

.holo-card:hover {
    transform: scale3d(1.02, 1.02, 1.02);
}

/* ============================================
   BADGES - ROUNDED!
   ============================================ */

.rarity-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg,
            var(--tier-badge-start),
            var(--tier-badge-end)) !important;

    /* DIVINE RARITY FIX: Cyan text on gold background for visibility */
    color: #00d9ff !important;
    /* Cyan (sky blue) for Divine rarity */
    text-shadow:
        0 0 10px rgba(0, 217, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.5) !important;

    border: 2px solid var(--tier-badge-border) !important;
    box-shadow: 0 0 20px var(--tier-badge-shadow) !important;
    padding: 5px 10px;
    border-radius: var(--radius-badge);
    /* 24px - ROUNDED! */
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;

    /* FIX: Width adjusted to accommodate longer rarity names (e.g., "TRANSCENDENT") */
    max-width: 110px;
    /* Increased for longer text */
    text-align: center;
    /* Centered text */
    white-space: nowrap;
    /* Prevent text wrapping */
    overflow: hidden;
    /* Hide overflow */
    text-overflow: ellipsis;
    /* Show ... if still too long */
    z-index: 4;
    animation: float 3s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    padding: 5px 10px;
    border-radius: var(--radius-badge);
    /* 24px - ROUNDED! */
    font-size: 0.7em;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
    z-index: 4;
    animation: pulse 2s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

/* MAX BENEFIT BADGE - For tiers with maxBenefit: true (Titan + Mythic) */
.max-benefit-badge {
    position: absolute;
    top: 10px;
    /* Same position as discount badge */
    right: 10px;
    background: linear-gradient(135deg, #ff0080, #ff8c00, #ffd700);
    color: #fff;
    padding: 6px 12px;
    border-radius: var(--radius-badge);
    font-size: 0.68em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6);
    border: 2px solid rgba(255, 215, 0, 0.8);
    z-index: 4;
    animation: pulse 2s ease-in-out infinite;
    backdrop-filter: blur(10px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* APY BADGE - For Staking Cards (Energy Return!) */
.apy-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #4ade80, #22c55e, #16a34a);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--radius-badge);
    font-size: 0.72em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 0 25px rgba(74, 222, 128, 0.6),
        0 5px 20px rgba(34, 197, 94, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(74, 222, 128, 0.9);
    z-index: 4;
    animation: energyPulse 2.5s ease-in-out infinite;
    backdrop-filter: blur(12px);
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.6);
}

@keyframes energyPulse {

    0%,
    100% {
        box-shadow:
            0 0 25px rgba(74, 222, 128, 0.6),
            0 5px 20px rgba(34, 197, 94, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }

    50% {
        box-shadow:
            0 0 35px rgba(74, 222, 128, 0.9),
            0 8px 30px rgba(34, 197, 94, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
        transform: scale(1.05);
    }
}

white-space: nowrap;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ============================================
   PACKAGE HEADER - CUSTOM FONT!
   ============================================ */

.package-header {
    text-align: center;
    margin-top: 22px;
}

.package-name {
    font-family: var(--font-custom);
    /* SAOUI Custom Font! */
    font-size: 1.59em;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.package-icon {
    font-size: 1em;
    filter: drop-shadow(0 5px 15px rgba(255, 165, 0, 0.6));
    animation: float 3s ease-in-out infinite;

    /* EMOJI FIX: Force system emoji fonts */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
    font-style: normal !important;
}

/* ============================================
   VIDEO SECTION - ROUNDED + DIVINE GLOW!
   ============================================ */

.video-section {
    width: 100%;
    height: 500px;
    /* Increased from 350px to match 1500x1500 animation (square ratio) */
    border-radius: var(--radius-video);
    /* 20px - ROUNDED! FIXED! */
    overflow: hidden;
    background: #000;
    position: relative;
    /* GPU compositing removed — 8 simultaneous cards exhaust VRAM, freezing videos */
}

/* GRID MODE: Fixed 336x336 video (100% zoom - no zoom needed!) for 1500x1500 animations */
body.grid-mode .video-section {
    width: 500px;
    height: 500px;
    margin: 0 auto;
}

.video-section video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* GPU hints removed — was causing video freeze in 8-card grid view */
}

/* ============================================
   CONTENT SECTIONS - ALL ROUNDED!
   ============================================ */

.token-display,
.mystery-boxes,
.price-section,
.pack-value-section {
    text-align: center;
    padding: 10px;
    border-radius: var(--radius-section);
    /* 20px - ROUNDED! FIXED! */
    backdrop-filter: blur(8px);
    transition: all var(--transition-speed) ease;
    position: relative;
}

.token-display {
    background: rgba(100, 200, 255, 0.15);
    border: 2px solid rgba(100, 200, 255, 0.4);
}

.mystery-boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 100, 255, 0.15);
    border: 2px solid rgba(255, 100, 255, 0.4);
}

.price-section {
    padding: 14px;
    background: rgba(255, 215, 0, 0.15);
    border: 2px solid rgba(255, 215, 0, 0.4);
}

.pack-value-section {
    background: linear-gradient(135deg,
            rgba(138, 43, 226, 0.2),
            rgba(186, 104, 200, 0.15));
    border: 2px solid;
    border-image: linear-gradient(45deg,
            #ba68c8, #8a2be2, #ba68c8) 1;
    overflow: hidden;
}

/* Token Elements */
.token-calculation,
.price-calculation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
}

.token-original,
.price-original {
    color: #888;
    text-decoration: line-through;
    opacity: 0.7;
}

.token-original {
    font-size: 1.2em;
}

.price-original {
    font-size: 1.4em;
}

.token-arrow,
.price-arrow {
    color: #4ade80;
}

.token-arrow {
    font-size: 1.1em;
}

.price-arrow {
    font-size: 1.2em;
}

.token-amount {
    font-size: 1.59em;
    font-weight: 800;
    background: linear-gradient(45deg, #00ff00, #00ffff);
    /* Green gradient for visibility */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.token-label {
    color: #a0a0ff;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.price {
    font-size: 1.94em;
    font-weight: 900;
    color: #00ffff;
}

.savings-badge {
    color: #4ade80;
    font-size: 0.79em;
    font-weight: bold;
}

/* Mystery Boxes */
.mystery-box-icon {
    font-size: 1.59em;

    /* EMOJI FIX: Force system emoji fonts */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
}

.mystery-box-info {
    display: flex;
    flex-direction: column;
}

.box-count {
    font-size: 1.15em;
    color: #ff64dc;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 100, 220, 0.8);
}

.box-type {
    color: #a0a0ff;
    font-size: 0.7em;
}

/* Pack Value */
.pack-value-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx) var(--my),
            rgba(186, 104, 200, 0.4) 0%,
            transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    /* 0.3s - Smooth fade */
}

.holo-card:hover .pack-value-section::before {
    opacity: 1;
}

.pack-value-label {
    color: #d8b4f8;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    font-weight: 600;
}

.pack-value-range {
    font-size: 1.4em;
    font-weight: bold;
    background: linear-gradient(45deg, #ba68c8, #e1bee7, #ba68c8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   BENEFITS - ROUNDED!
   ============================================ */

.benefits-section {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    flex: 1 1 0%;
    /* FLEXBOX PHASE: Stretch to fill space, pushing button to bottom! */
    align-content: flex-end;
    /* Align benefit items to top of stretched space */
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-section);
    /* 20px - ROUNDED! */
    font-size: 0.74em;
    transition: all var(--transition-speed) ease;
    backdrop-filter: blur(6px);
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transform: translateY(-2px);
}

.benefit-icon {
    font-size: 1em;

    /* EMOJI FIX: Force system emoji fonts */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
}

/* ============================================
   PURCHASE BUTTON - ROUNDED!
   ============================================ */

.btn-purchase {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg,
            var(--tier-badge-start),
            var(--tier-badge-end));
    border: 2px solid var(--tier-badge-border);
    border-radius: var(--radius-button);
    /* 20px - ROUNDED! */
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px var(--tier-badge-shadow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-purchase:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px var(--tier-badge-shadow);
}

.btn-purchase:active {
    transform: translateY(-1px);
}

/* ============================================
   RARITY STARS
   ============================================ */

.rarity-stars {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 3px;
}

.star {
    color: #ffd700;
    font-size: 0.8em;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
}

/* ============================================
   DEBUG INFO (OPTIONAL)
   ============================================ */

.debug-info {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #4ade80;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.7em;
    font-family: monospace;
    border: 1px solid rgba(74, 222, 128, 0.3);
    z-index: 9999;
}