/* updated CSS with visual distinction for premium vs standard rewards and icons */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=MedievalSharp&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
    cursor: url('mouse.cur'), auto !important;
}

body {
    font-family: 'Cinzel', serif;
    background-size: cover;
    background: url('last.jpg') no-repeat center center fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 20vh;
    padding: 1px;
    color: #e0e0e0;
}

.main-container {
    position: relative;
    width: 1020px;
    height: 730px;
    background: linear-gradient(180deg, #1A0A00 0%, #3D1A00 50%, #7A3500 100%);
    border: 2px solid #E87B1E;
    border-radius: 8px;
    box-shadow: 
        0 0 0 2px rgba(232,123,30,0.6),
        0 8px 20px rgba(0,0,0,0.9),
        inset 0 1px 0 rgba(232,123,30,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header-bar {
    background: linear-gradient(90deg, transparent 0%, rgba(232,123,30,0.15) 20%, rgba(232,123,30,0.25) 50%, rgba(232,123,30,0.15) 80%, transparent 100%), linear-gradient(180deg, #3D1A00 0%, #1A0A00 100%);
    padding: 3px;
    text-align: center;
    border-bottom: 2px solid #E87B1E;
    position: relative;
    box-shadow: 0 3px 15px rgba(0,0,0,0.6), inset 0 1px 0 rgba(232,123,30,0.2);
    flex-shrink: 0;
}

.battlepass-label {
    font-size: 9px;
    letter-spacing: 3px;
    color: #FFD9A8;
    text-transform: uppercase;
    font-weight: 400;
    text-shadow: 0 0 8px rgba(255,217,168,0.9), 0 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 3px;
    animation: label-glow 3s ease-in-out infinite;
}

@keyframes label-glow {
    0%, 100% { text-shadow: 0 0 8px rgba(255,217,168,0.8), 0 2px 4px rgba(0,0,0,0.8); }
    50% { text-shadow: 0 0 15px rgba(255,217,168,1), 0 2px 4px rgba(0,0,0,0.8); }
}

.content-wrapper {
    padding: 10px;
    display: flex;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}

.levels-section {
    flex: 2.5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.status-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.status-panel {
    background: linear-gradient(135deg, rgba(61,26,0,0.95) 0%, rgba(26,10,0,0.98) 100%);
    border: 2px solid #E87B1E;
    border-radius: 8px;
    padding: 10px;
    height: 100%;
    box-shadow: 0 3px 12px rgba(0,0,0,0.9);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
}
	

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(122,53,0,0.25) 0%, rgba(122,53,0,0.15) 100%);
    border-radius: 5px;
    border-left: 2px solid #E87B1E;
}

.status-label {
    font-size: 15px;
    font-weight: 600;
}

.status-value {
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
}


.level-progress {
    background: linear-gradient(135deg, rgba(122,53,0,0.45) 0%, rgba(40,15,0,0.35) 100%);
    border-radius: 6px;
    padding: 10px;
    border-left: 2px solid #F0A050;
    margin-top: 6px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.4), 0 0 8px rgba(122,53,0,0.25);
}
.level-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #FFE8C0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-shadow: 0 0 8px rgba(80,165,255,0.45);
}


.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(26,10,0,0.8);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #E87B1E;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8BC34A);
    border-radius: 5px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.premium-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 50%, #FF6D00 100%);
    color: #1A0A00;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.standard-badge {
    background: linear-gradient(135deg, #E87B1E 0%, #7A3500 50%, #3D1A00 100%);
    color: #FFD9A8;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.purchase-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.purchase-button {
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 20%, #FF6D00 50%, #FFA000 80%, #FFD700 100%);
    background-size: 200% 200%;
    color: #1A0A00;
    border: 2px solid #FF6D00;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.8), 0 0 15px rgba(255,109,0,0.5);
    transition: all 0.3s ease;
    text-transform: uppercase;
    animation: gold-glow 2s ease-in-out infinite;
    position: relative;
}

@keyframes gold-glow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; box-shadow: 0 3px 10px rgba(0,0,0,0.8), 0 0 25px rgba(255,109,0,0.8); }
}

.purchase-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.9), 0 0 25px rgba(255,109,0,0.9);
}

.purchase-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #3D1A00 0%, #1A0A00 100%);
    color: #E87B1E;
    animation: none;
}

.standard-button {
    background: linear-gradient(135deg, #F0A050 0%, #E87B1E 20%, #7A3500 50%, #E87B1E 80%, #F0A050 100%);
    border: 2px solid #7A3500;
    animation: blue-glow 2s ease-in-out infinite;
}

@keyframes blue-glow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; box-shadow: 0 3px 10px rgba(0,0,0,0.8), 0 0 25px rgba(232,123,30,0.8); }
}

.levels-container {
    background: linear-gradient(135deg, rgba(61,26,0,0.95) 0%, rgba(26,10,0,0.98) 100%);
    border: 2px solid #E87B1E;
    border-radius: 8px;
    padding: 10px;
    height: 100%;
    box-shadow: 0 3px 12px rgba(0,0,0,0.9);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.levels-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(232,123,30,0.4);
}

.levels-title {
    color: #FFD9A8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-nav-btn {
    background: linear-gradient(135deg, #E87B1E 0%, #7A3500 100%);
    border: 1px solid #F0A050;
    color: #FFD9A8;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.page-nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #F0A050 0%, #E87B1E 100%);
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(232,123,30,0.8);
}

.page-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-indicator {
    color: #FFD9A8;
    font-size: 9px;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    background: rgba(122,53,0,0.3);
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid #E87B1E;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

.levels-grid::-webkit-scrollbar {
    width: 6px;
}

.levels-grid::-webkit-scrollbar-track {
    background: rgba(122,53,0,0.2);
    border-radius: 8px;
}

.levels-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #F0A050 0%, #E87B1E 100%);
    border-radius: 8px;
}

.level-card {
    background: linear-gradient(135deg, rgba(122,53,0,0.3) 0%, rgba(122,53,0,0.2) 100%);
    border: 1px solid #E87B1E;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.level-card.current {
    border-color: #4caf50;
    box-shadow: 0 0 15px rgba(76,175,80,0.5);
    transform: scale(1.02);
}

.level-card.locked {
    opacity: 0.6;
    border-color: #666;
}

.level-card.completed {
    border-color: #FFD700;
    background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(122,53,0,0.2) 100%);
}

.level-number {
    font-size: 15px;
    font-weight: 900;
    color: #FFD9A8;
    margin-bottom: 4px;
}

.level-required {
    font-size: 11px;
    color: #F0A050;
    margin-bottom: 6px;
}

/* ---------- ICON AREA (updated) ---------- */
.icon-line {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 6px 4px;
    margin-bottom: 6px;
}

/* improved icon frame, conservative with existing colors */
.level-icon-wrapper {
    position: relative;
    width: 46px;
    height: 46px;
    padding: 3px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        0 6px 12px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.03);
    transition: transform 0.12s ease, box-shadow 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* subtle accent ring using same palette */
.level-icon-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(232,123,30,0.03), rgba(232,123,30,0.01));
    mix-blend-mode: overlay;
}

.level-icon-wrapper:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 10px 18px rgba(0,0,0,0.7),
        0 0 18px rgba(232,123,30,0.12),
        inset 0 1px 0 rgba(255,255,255,0.03);
}

/* Tier-specific styles: premium = gold accent, standard = blue accent */
.level-icon-wrapper.premium {
    border: 2px solid rgba(255, 200, 30, 0.95);
    box-shadow: 0 8px 16px rgba(255,200,30,0.12), inset 0 1px 0 rgba(255,255,255,0.03);
}
.level-icon-wrapper.standard {
    border: 2px solid rgba(232,123,30,0.9);
    box-shadow: 0 8px 16px rgba(232,123,30,0.06), inset 0 1px 0 rgba(255,255,255,0.03);
}

/* small badge in corner to indicate tier (P = premium, S = standard) */
.icon-tier-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 900;
    color: #042033;
    border: 1px solid rgba(0,0,0,0.35);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* adjust badge color for premium vs standard */
.level-icon-wrapper.premium .icon-tier-badge {
    background: linear-gradient(135deg, #FFD700, #FFB300);
    color: #04122a;
}
.level-icon-wrapper.standard .icon-tier-badge {
    background: linear-gradient(135deg, #F0A050, #E87B1E);
    color: #04122a;
}

.level-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid rgba(0,0,0,0.45);
    box-shadow: inset 0 2px 6px rgba(255,255,255,0.03), 0 2px 6px rgba(0,0,0,0.6);
    display: block;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.level-icon-wrapper:hover .level-icon {
    transform: translateY(-1px);
    filter: saturate(1.05);
}

.icon-badge {
    position: absolute;
    right: -8px;
    bottom: -8px;
    background: rgba(26,10,0,0.95);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    white-space: nowrap;
}

/* label shown when icon hovered: plain text without background (user requested) */
.icon-label {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    color: #FFE8C0; /* keep existing text color */
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    padding: 0;        /* no background / no box */
    margin: 0;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* rest of UI keeps original styles (not modified) */
.rewards-list {
    font-size: 20px;
    color: #FFD9A8;
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    max-height: 200px;
}

.reward-item {
    margin: 0;
    padding: 3px 5px;
    background: rgba(232,123,30,0.2);
    border-radius: 3px;
    font-size: 7px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(232,123,30,0.3);
    min-height: 18px;
}

/* standard reward row subtle left accent */
.reward-item.standard {
    border-left: 4px solid rgba(232,123,30,0.85);
    background: linear-gradient(90deg, rgba(232,123,30,0.06), rgba(232,123,30,0.02));
}

/* premium reward row gold accent and a star indicator */
.reward-item.premium {
    background: rgba(255,215,0,0.06);
    color: #FFD700;
    border: 1px solid rgba(255,215,0,0.18);
    border-left: 4px solid rgba(255,200,30,0.95);
}

.reward-name {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: 8.5px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: #FFE8C0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    padding-right: 4px;
}

.reward-quantity {
    font-weight: 700;
    text-align: right;
    min-width: 28px;
    margin-left: 4px;
}

.claim-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
}

.claim-button {
    background: linear-gradient(135deg, #4CAF50 0%, #3F8F45 100%);
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.45), inset 0 0 6px rgba(255,255,255,0.08);
}

.claim-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #57C85A 0%, #49A54C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.55);
}

.claim-button:disabled {
    background: linear-gradient(135deg, #555 0%, #444 100%);
    border-color: rgba(255,255,255,0.08);
    cursor: not-allowed;
    opacity: 0.7;
}

.claim-button.claimed {
    background: linear-gradient(135deg, #3496C9 0%, #2E82AF 100%);
    border-color: rgba(255,255,255,0.15);
}

.claim-button.premium {
    background: linear-gradient(135deg, #FFD700 0%, #EAAA00 100%);
    color: #0B1A3A;
    border-color: rgba(240, 190, 50, 0.4);
    box-shadow: 0 2px 6px rgba(255,200,50,0.35);
}

.claim-button.premium:hover:not(:disabled) {
    background: linear-gradient(135deg, #FFE25A 0%, #FFC400 100%);
    box-shadow: 0 4px 8px rgba(255,200,50,0.45);
}

.result-message { font-size: 12px; font-weight: 700; color: #4caf50; background: linear-gradient(135deg, rgba(76,175,80,0.3) 0%, rgba(76,175,80,0.2) 100%); border: 2px solid #4caf50; border-radius: 8px; padding: 12px 15px; text-shadow: 0 0 8px rgba(76,175,80,1); display: none; box-shadow: 0 3px 10px rgba(76,175,80,0.5); position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000; text-align: center; max-width: 400px; }
.result-message.error { color: #f44336; background: linear-gradient(135deg, rgba(244,67,54,0.3) 0%, rgba(244,67,54,0.2) 100%); border-color: #f44336; text-shadow: 0 0 8px rgba(244,67,54,1); box-shadow: 0 3px 10px rgba(244,67,54,0.5); }

.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26,10,0,0.9); display: none; justify-content: center; align-items: center; z-index: 999; color: #FFD9A8; font-size: 14px; flex-direction: column; gap: 15px; }
.loading-spinner { width: 40px; height: 40px; border: 4px solid rgba(232,123,30,0.3); border-top: 4px solid #E87B1E; border-radius: 50%; animation: spin 1s linear infinite; }

@keyframes spin { 0%{transform:rotate(0deg)}100%{transform:rotate(360deg)} }