
/* ============================================
   Rank Badge Avatar System
   ============================================ */

/* Wrapper: positions circle + badge overlay */
.rank-avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Circle with user initial - Desktop/Mobile nav */
.rank-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0;
    transition: all 0.3s ease;
    user-select: none;
}
.rank-avatar-circle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Badge overlay - small corner decoration */
.rank-badge-overlay {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--main-color, #b22222);
    background: var(--main-color, #b22222);
    object-fit: contain;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}
.rank-avatar-wrapper:hover .rank-badge-overlay {
    transform: scale(1.15);
}

/* ============================================
   Nav Claymorphism Badge — Desktop & Mobile
   ============================================ */

/* Nav wrapper — claymorphic circle */
.rank-avatar-wrapper--nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #00374a;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        6px 6px 12px rgba(0, 0, 0, 0.25),
        -4px -4px 10px rgba(255, 255, 255, 0.08),
        inset 2px 2px 5px rgba(255, 255, 255, 0.15),
        inset -2px -2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.rank-avatar-wrapper--nav:hover {
    transform: scale(1.08);
    box-shadow:
        8px 8px 16px rgba(0, 0, 0, 0.3),
        -5px -5px 12px rgba(255, 255, 255, 0.1),
        inset 2px 2px 5px rgba(255, 255, 255, 0.18),
        inset -2px -2px 5px rgba(0, 0, 0, 0.22);
}
.rank-avatar-wrapper--nav:active {
    transform: scale(0.96);
}

/* Badge image — centred inside clay circle */
.rank-badge-nav {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s ease;
}
.rank-avatar-wrapper--nav:hover .rank-badge-nav {
    transform: scale(1.1);
}

/* Mobile nav variant — slightly smaller */
.rank-avatar-wrapper--nav-mobile {
    width: 34px;
    height: 34px;
}
.rank-avatar-wrapper--nav-mobile .rank-badge-nav {
    width: 22px;
    height: 22px;
}

/* Mobile nav variant - slightly smaller */
.rank-avatar-circle--mobile {
    width: 32px;
    height: 32px;
    font-size: 13px;
}
.rank-avatar-wrapper--mobile .rank-badge-overlay {
    width: 18px;
    height: 18px;
    bottom: -2px;
    right: -2px;
}

/* Sidebar variant - larger profile card */
.rank-avatar-wrapper--sidebar {
    margin-bottom: 4px;
}
.rank-avatar-circle--sidebar {
    width: 72px;
    height: 72px;
    font-size: 28px;
    border-width: 3px;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.rank-avatar-wrapper--sidebar .rank-badge-overlay {
    width: 28px;
    height: 28px;
    bottom: -2px;
    right: -2px;
    border-width: 3px;
}

/* Rank name label pill */
.rank-name-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2px;
    transition: all 0.3s ease;
}

/* Sidebar profile card layout */
.sidebar-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px 18px;
    width: 100%;
}

/* Username in sidebar */
.sidebar-username {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* Balance pill in sidebar */
.sidebar-balance-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.coupon-section-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 8px 0 4px 0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.coupon-section-divider:first-child {
    margin-top: 0;
}
.coupon-section-divider .section-icon {
    font-size: 16px;
}
.coupon-section-divider .section-title {
    flex: 1;
}
.coupon-section-divider .section-count {
    background: rgba(255,255,255,0.85);
    color: #333;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    padding: 0 6px;
}
/* Theme-specific section divider colors */
.coupon-section-divider.section-rank {
    background: linear-gradient(135deg, rgba(180,130,50,0.15) 0%, rgba(120,80,20,0.15) 100%);
    color: #d4a54a;
}
.coupon-section-divider.section-rank .section-count {
    background: rgba(180,130,50,0.2);
    color: #d4a54a;
}
.coupon-section-divider.section-freecredit {
    background: linear-gradient(135deg, rgba(34,211,238,0.12) 0%, rgba(192,132,252,0.12) 100%);
    color: #67e8f9;
}
.coupon-section-divider.section-freecredit .section-count {
    background: rgba(34,211,238,0.2);
    color: #67e8f9;
}
.coupon-section-divider.section-bonus {
    background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(217,119,6,0.15) 100%);
    color: #d97706;
}
.coupon-section-divider.section-bonus .section-count {
    background: rgba(245,158,11,0.2);
    color: #d97706;
}
.coupon-section-divider.section-cashback {
    background: linear-gradient(135deg, rgba(13,202,240,0.15) 0%, rgba(13,110,253,0.15) 100%);
    color: #0d6efd;
}
.coupon-section-divider.section-cashback .section-count {
    background: rgba(13,110,253,0.2);
    color: #0d6efd;
}
.coupon-section-divider.section-special {
    background: linear-gradient(135deg, rgba(220,53,69,0.15) 0%, rgba(176,42,55,0.15) 100%);
    color: #dc3545;
}
.coupon-section-divider.section-special .section-count {
    background: rgba(220,53,69,0.2);
    color: #dc3545;
}
/* Unified FAB gradient overridden by new modern gradient in .reward-fab */

.icon-box {
    border: 1px solid #e5e5e5 !important;
}

.icon-box:hover {
    color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
    background: #333333;
    border: 1px solid #e5e5e5;
}

/* ============================================
    Coupon Reward System - Theme Variables
    Bootstrap-based themes selectable per type
    ============================================ */

/* Theme: rank (Dark Gold Luxury) */
.coupon-theme-rank {
    --coupon-bg-start: #1a1a1a;
    --coupon-bg-end: #1a1a1a;
    --coupon-shadow: rgba(180, 130, 50, 0.25);
    --coupon-fab-shadow: rgba(180, 130, 50, 0.5);
    --coupon-icon-bg-start: #1a1a1a;
    --coupon-icon-bg-end: #1a1a1a;
    --coupon-icon-shadow: rgba(245, 158, 11, 0.3);
    --coupon-btn-bg-start: transparent;
    --coupon-btn-bg-end: transparent;
    --coupon-btn-color: #d4a54a;
    --coupon-btn-shadow: rgba(180, 130, 50, 0.2);
    --coupon-swal-start: #1a1a1a;
    --coupon-swal-end: #2a2218;
    --coupon-swal-btn: #d4a54a;
}

/* ============================================
    Rank Theme - Dark Gold Luxury Overrides
    ============================================ */
.coupon-theme-rank {
    border: 1px solid rgba(180, 130, 50, 0.35);
    border-radius: 12px;
    overflow: hidden;
}

.coupon-theme-rank::before {
    display: none;
}

/* Gold accent bar at top */
.coupon-theme-rank .coupon-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #92600a, #f5d078, #92600a);
}

.coupon-theme-rank .coupon-header {
    background: transparent;
    padding: 14px 14px 10px;
    border-bottom: none;
    position: relative;
}

/* Diamond shaped icon */
.coupon-theme-rank .coupon-icon {
    width: 40px;
    height: 40px;
    background: #1a1a1a !important;
    border: 2px solid #d4a54a;
    border-radius: 0 !important;
    transform: rotate(45deg);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    position: relative;
}

.coupon-theme-rank .coupon-icon span {
    display: inline-block;
    transform: rotate(-45deg);
}

.coupon-theme-rank .coupon-header .coupon-info .title {
    color: rgba(212, 165, 74, 0.8);
    font-size: 9px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.coupon-theme-rank .coupon-header .coupon-info .coupon-name {
    color: #f5d078;
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    text-shadow: none;
    font-family: Georgia, 'Times New Roman', serif;
}

.coupon-theme-rank .coupon-header .close-btn {
    color: rgba(180, 130, 50, 0.5);
}
.coupon-theme-rank .coupon-header .close-btn:hover {
    color: #d4a54a;
    background: rgba(180, 130, 50, 0.1);
}

.coupon-theme-rank .coupon-body {
    padding: 20px 14px 24px;
}

.coupon-theme-rank .prize-amount {
    font-size: 48px;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: -2px;
    text-shadow: none;
    animation: none;
}

.coupon-theme-rank .prize-amount .currency-symbol {
    color: #d4a54a;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 32px;
}

.coupon-theme-rank .prize-type {
    color: rgba(180, 130, 50, 0.6);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 6px;
    margin-bottom: 18px;
}

.coupon-theme-rank .prize-type-label {
    color: rgba(113, 113, 122, 1);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 4px;
}

.coupon-theme-rank .claim-btn {
    width: 100%;
    border: 1px solid rgba(212, 165, 74, 0.5);
    border-radius: 0;
    background: transparent !important;
    color: #d4a54a;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 14px 28px;
    font-size: 13px;
    transition: all 0.5s;
    box-shadow: none;
}

.coupon-theme-rank .claim-btn:hover {
    background: #d4a54a !important;
    color: #1a1a1a;
    transform: none;
    box-shadow: none;
}

.coupon-theme-rank .coupon-footer {
    background: transparent;
    border-top: 1px solid rgba(63, 63, 70, 0.6);
    padding: 10px 14px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(113, 113, 122, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Theme: freecredit (Dark Indigo Glassmorphism) */
.coupon-theme-freecredit {
    --coupon-bg-start: #0f0d2e;
    --coupon-bg-end: #1a1640;
    --coupon-shadow: rgba(34, 211, 238, 0.15);
    --coupon-fab-shadow: rgba(34, 211, 238, 0.4);
    --coupon-icon-bg-start: #22d3ee;
    --coupon-icon-bg-end: #d946ef;
    --coupon-icon-shadow: rgba(34, 211, 238, 0.3);
    --coupon-btn-bg-start: #ffffff;
    --coupon-btn-bg-end: #f0f9ff;
    --coupon-btn-color: #1e1b4b;
    --coupon-btn-shadow: rgba(255, 255, 255, 0.15);
    --coupon-swal-start: #0f0d2e;
    --coupon-swal-end: #1a1640;
    --coupon-swal-btn: #22d3ee;
}

/* ============================================
    FreeCredit Theme - Indigo Glassmorphism Overrides
    ============================================ */
.coupon-theme-freecredit {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 13, 46, 0.85) 0%, rgba(26, 22, 64, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(34, 211, 238, 0.1), inset 0 1px 0 rgba(255,255,255,0.08);
}

.coupon-theme-freecredit::before {
    display: none;
}

.coupon-theme-freecredit .coupon-header {
    background: transparent;
    padding: 20px 20px 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    border-bottom: none;
}

/* Gradient ring icon */
.coupon-theme-freecredit .coupon-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #22d3ee 0%, #d946ef 100%) !important;
    border-radius: 50% !important;
    padding: 3px;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25);
    position: relative;
}

.coupon-theme-freecredit .coupon-icon::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #0f0d2e;
    border-radius: 50%;
}

.coupon-theme-freecredit .coupon-icon span,
.coupon-theme-freecredit .coupon-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.coupon-theme-freecredit .coupon-header .coupon-info {
    text-align: center;
}

.coupon-theme-freecredit .coupon-header .coupon-info .title {
    color: rgba(103, 232, 249, 0.8);
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 1;
}

.coupon-theme-freecredit .coupon-header .coupon-info .coupon-name {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: none;
    text-align: center;
    white-space: normal;
}

.coupon-theme-freecredit .coupon-header .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    color: rgba(255, 255, 255, 0.3);
}
.coupon-theme-freecredit .coupon-header .close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.coupon-theme-freecredit .coupon-body {
    padding: 8px 20px 24px;
}

/* Glass panel for prize */
.coupon-theme-freecredit .fc-prize-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px 20px;
    margin-bottom: 20px;
}

.coupon-theme-freecredit .prize-amount {
    font-size: 52px;
    font-weight: 700;
    background: linear-gradient(90deg, #67e8f9, #ffffff, #d8b4fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    text-shadow: none;
    animation: none;
    margin-bottom: 0;
    line-height: 1;
}

.coupon-theme-freecredit .prize-type {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 10px;
    margin-bottom: 0;
}

.coupon-theme-freecredit .claim-btn {
    width: 100%;
    background: #ffffff !important;
    color: #1e1b4b;
    border-radius: 50px;
    border: none;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    text-transform: none;
}

.coupon-theme-freecredit .claim-btn:hover {
    background: #ecfeff !important;
    transform: none;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
}

.coupon-theme-freecredit .coupon-footer {
    background: transparent;
    border-top: none;
    padding: 0 20px 16px;
    justify-content: center;
    gap: 28px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Theme: bonus (Bootstrap warning/gold) */
.coupon-theme-bonus {
    --coupon-bg-start: #f59e0b;
    --coupon-bg-end: #d97706;
    --coupon-shadow: rgba(245, 158, 11, 0.35);
    --coupon-fab-shadow: rgba(245, 158, 11, 0.5);
    --coupon-icon-bg-start: #fbbf24;
    --coupon-icon-bg-end: #f59e0b;
    --coupon-icon-shadow: rgba(251, 191, 36, 0.4);
    --coupon-btn-bg-start: #fbbf24;
    --coupon-btn-bg-end: #f59e0b;
    --coupon-btn-color: #333;
    --coupon-btn-shadow: rgba(251, 191, 36, 0.4);
    --coupon-swal-start: #f59e0b;
    --coupon-swal-end: #d97706;
    --coupon-swal-btn: #f59e0b;
}

/* Theme: cashback (Bootstrap info/blue) */
.coupon-theme-cashback {
    --coupon-bg-start: #0dcaf0;
    --coupon-bg-end: #0d6efd;
    --coupon-shadow: rgba(13, 110, 253, 0.3);
    --coupon-fab-shadow: rgba(13, 110, 253, 0.5);
    --coupon-icon-bg-start: #6ea8fe;
    --coupon-icon-bg-end: #0d6efd;
    --coupon-icon-shadow: rgba(13, 110, 253, 0.4);
    --coupon-btn-bg-start: #fff;
    --coupon-btn-bg-end: #e9ecef;
    --coupon-btn-color: #0d6efd;
    --coupon-btn-shadow: rgba(13, 110, 253, 0.3);
    --coupon-swal-start: #0dcaf0;
    --coupon-swal-end: #0d6efd;
    --coupon-swal-btn: #0d6efd;
}

/* Theme: special (Bootstrap danger/red) */
.coupon-theme-special {
    --coupon-bg-start: #dc3545;
    --coupon-bg-end: #b02a37;
    --coupon-shadow: rgba(220, 53, 69, 0.35);
    --coupon-fab-shadow: rgba(220, 53, 69, 0.5);
    --coupon-icon-bg-start: #f8d7da;
    --coupon-icon-bg-end: #f1aeb5;
    --coupon-icon-shadow: rgba(220, 53, 69, 0.4);
    --coupon-btn-bg-start: #ffd700;
    --coupon-btn-bg-end: #ffb800;
    --coupon-btn-color: #333;
    --coupon-btn-shadow: rgba(255, 215, 0, 0.4);
    --coupon-swal-start: #dc3545;
    --coupon-swal-end: #b02a37;
    --coupon-swal-btn: #dc3545;
}

/* Mobile Overlay Background */
.coupon-reward-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1049;
    backdrop-filter: blur(4px);
}

.coupon-reward-overlay.show {
    display: block;
}

/* Container - Mobile First */
.coupon-reward-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px 24px 0 0;
    animation: slideUp 0.3s ease-out;
}

.coupon-reward-container::-webkit-scrollbar {
    width: 4px;
}

.coupon-reward-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.coupon-reward-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header for mobile bottom sheet */
.coupon-reward-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 12px;
}

.coupon-reward-header .header-title {
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-reward-header .header-title .count-badge {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.coupon-reward-header .close-all-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.coupon-reward-header .close-all-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Coupon Grid for Mobile */
.coupon-reward-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-reward-coupon {
    background: linear-gradient(135deg, var(--coupon-bg-start) 0%, var(--coupon-bg-end) 100%);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 8px 32px var(--coupon-shadow);
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out backwards;
    position: relative;
    flex-shrink: 0;
}

.coupon-reward-coupon:nth-child(1) { animation-delay: 0s; }
.coupon-reward-coupon:nth-child(2) { animation-delay: 0.05s; }
.coupon-reward-coupon:nth-child(3) { animation-delay: 0.1s; }
.coupon-reward-coupon:nth-child(4) { animation-delay: 0.15s; }
.coupon-reward-coupon:nth-child(5) { animation-delay: 0.2s; }

.coupon-reward-coupon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Compact Coupon Layout for Mobile */
.coupon-header {
    background: rgba(0,0,0,0.2);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.coupon-header .coupon-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--coupon-icon-bg-start) 0%, var(--coupon-icon-bg-end) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px var(--coupon-icon-shadow);
    flex-shrink: 0;
}

.coupon-header .coupon-info {
    flex: 1;
    color: white;
    min-width: 0;
}

.coupon-header .coupon-info .title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 1px;
}

.coupon-header .coupon-info .coupon-name {
    font-size: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coupon-header .close-btn {
    display: none; /* Hide individual close on mobile */
}

.coupon-body {
    padding: 14px 14px 16px;
    text-align: center;
    color: white;
    position: relative;
}

.prize-amount {
    font-size: 32px;
    font-weight: 800;
    text-shadow: 0 3px 6px rgba(0,0,0,0.2);
    margin-bottom: 2px;
    animation: pulse 2s infinite;
}

.prize-amount small {
    font-size: 16px;
    font-weight: 600;
}

.prize-type {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.claim-btn {
    background: linear-gradient(135deg, var(--coupon-btn-bg-start) 0%, var(--coupon-btn-bg-end) 100%);
    color: var(--coupon-btn-color);
    border: none;
    padding: 10px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px var(--coupon-btn-shadow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--coupon-btn-shadow);
}

.claim-btn:active {
    transform: translateY(0) scale(0.98);
}

.claim-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.claim-btn .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: var(--coupon-btn-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.claim-btn.loading .spinner {
    display: inline-block;
    margin-right: 8px;
}

.claim-btn.loading .btn-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.coupon-footer {
    background: rgba(0,0,0,0.15);
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: rgba(255,255,255,0.8);
}

.expire-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Success Animation */
.coupon-claimed {
    animation: claimSuccess 0.5s ease-out forwards;
}

@keyframes claimSuccess {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
    }
}

@keyframes fadeOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Minimized State - FAB */
.coupon-reward-minimized {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 1050;
    cursor: pointer;
}

/* 24K Gold Leaf Shine Animation */
@keyframes fabShine {
    0%   { left: -100%; }
    20%  { left: 100%; }
    100% { left: 100%; }
}

.reward-fab {
    width: 64px;
    height: 64px;
    border: none;
    outline: none;
    background: linear-gradient(to bottom, #f9d976, #f39c12, #d35400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s ease;
    color: #fff;
    font-size: 24px;
}

/* Gold shine sweep */
.reward-fab::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    animation: fabShine 4s infinite;
    pointer-events: none;
}

.reward-fab:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 35px rgba(243, 156, 18, 0.6);
}

.reward-fab:active {
    transform: scale(0.95);
}

.reward-fab i {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.reward-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: #000000;
    color: #f9d976;
    border: 1px solid #f9d976;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    pointer-events: none;
}

/* ============================================
    TABLET & DESKTOP STYLES
    ============================================ */
@media (min-width: 576px) {
    .coupon-reward-container {
        bottom: auto;
        top: 80px;
        left: auto;
        right: 20px;
        width: 360px;
        max-height: calc(100vh - 120px);
        border-radius: 20px;
        padding: 16px;
        background: rgba(0, 0, 0, 0.2);
        animation: slideInRight 0.3s ease-out;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    .coupon-reward-header .close-all-btn {
        padding: 6px 14px;
    }

    .coupon-header .close-btn {
        display: flex;
        background: rgba(255,255,255,0.2);
        border: none;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        color: white;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        flex-shrink: 0;
    }

    .coupon-header .close-btn:hover {
        background: rgba(255,255,255,0.3);
        transform: scale(1.1);
    }

    .prize-amount {
        font-size: 38px;
    }

    .claim-btn {
        padding: 11px 30px;
        font-size: 15px;
    }

    .coupon-reward-minimized {
        bottom: 20px;
        right: 20px;
    }

    .reward-fab {
        width: 60px;
        height: 60px;
    }

    .reward-fab .icon {
        font-size: 28px;
    }
}

/* Large Desktop */
@media (min-width: 992px) {
    .coupon-reward-container {
        width: 380px;
        top: 100px;
        right: 30px;
    }

    .prize-amount {
        font-size: 42px;
    }
}

/* Modern SweetAlert Styles */
.swal-modern-popup {
    border-radius: 24px !important;
    padding: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.swal-modern-popup .swal2-icon {
    display: none !important;
}

.swal-modern-btn {
    border-radius: 50px !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
}

.swal-modern-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Error Popup Styles */
.swal-error-popup {
    border-radius: 24px !important;
    padding: 24px !important;
}

.swal-error-popup .swal2-icon.swal2-error {
    border-color: #ff4757 !important;
}

.swal-error-popup .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #ff4757 !important;
}