
#attendance-modal .modal-content {
    max-width: calc(1600px * var(--ui-scale-modal-size));
    width: 95%;
    height: 90vh;
    max-height: 1080px;

    background: linear-gradient(135deg, #151922 0%, #1e232e 100%);
    border: 2px solid #3b4252;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 28px;
    overflow: hidden;
    color: #f0f0f0;
    position: relative;
}

#attendance-modal .close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 200;
    font-size: 3.5em;
    color: #888;
    line-height: 0.8;
    cursor: pointer;
    transition: all 0.3s;
}
#attendance-modal .close-button:hover {
    color: #fff;
    transform: rotate(90deg);
}

.season-header-section {

    background: linear-gradient(to bottom, #232834, #191c24);
    padding: 40px 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10;
}

.season-info-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 300px;
}

.season-info-left h2 {
    font-size: 3.2em;
    color: #fff;
    margin: 0;
    font-weight: 900;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.season-badge {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    font-size: 0.4em;
    padding: 8px 16px;
    border-radius: 8px;
    vertical-align: middle;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid rgba(255,255,255,0.4);
}

.season-timer {
    color: #ccc;
    font-size: 1.3em;
    font-family: 'Roboto Mono', monospace;
    background: rgba(0,0,0,0.3);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.season-timer span {
    color: #ffd700;
    font-weight: bold;
    margin-left: 8px;
    font-size: 1.1em;
}

.season-progress-container {
    flex-grow: 1;
    max-width: calc(700px * var(--ui-scale-modal-size));
    margin: 0 50px;
    text-align: center;
    background: rgba(255,255,255,0.03);
    padding: 25px 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.current-level-display {
    font-size: 3em;
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    line-height: 1;
}

.level-text-big {
    color: #ffd700;
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    font-family: 'Impact', sans-serif;
    letter-spacing: 2px;
    font-size: 1.2em;
}

.sp-text-small {
    font-size: 0.4em;
    color: #aaa;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(0,0,0,0.6);
    padding: 4px 15px;
    border-radius: 20px;
    border: 1px solid #444;
}

.season-main-progress-bar {
    width: 100%;
    height: 30px;
    background: #111;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #444;
    position: relative;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.8);
}

.season-main-progress-fill {
    height: 100%;

    background: linear-gradient(90deg, #ff8c00, #ffd700);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
    border-radius: 15px;
    position: relative;
}

.season-main-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 50%;
    background: rgba(255,255,255,0.3);
    border-radius: 15px 15px 0 0;
}

.daily-mission-status {
    background: linear-gradient(135deg, #2a303c, #232730);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1em;
    min-width: 320px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.daily-mission-header {
    color: #e0e0e0;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: bold;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.daily-stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #ccc;
    align-items: center;
    padding: 2px 0;
}
.daily-stat-row:last-child { margin-bottom: 0; }

.daily-stat-row span:first-child {
    font-weight: 500;
}

.daily-stat-val {
    font-weight: bold;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    background: rgba(0,0,0,0.4);
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 80px;
    text-align: center;
}
.daily-stat-val.maxed {
    color: #ff6b6b;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

#season-pass-track-wrapper {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    background: #16191e;
    position: relative;
    display: flex;
    align-items: flex-start;

    padding-top: clamp(30px, 12vh, 130px);
    padding-bottom: clamp(20px, 8vh, 80px);

    scrollbar-width: thin;
    scrollbar-color: #555 #111;
}
#season-pass-track-wrapper::-webkit-scrollbar { height: 14px; }
#season-pass-track-wrapper::-webkit-scrollbar-track { background: #0a0a0a; }
#season-pass-track-wrapper::-webkit-scrollbar-thumb { background: #555; border-radius: 7px; border: 3px solid #0a0a0a; }
#season-pass-track-wrapper::-webkit-scrollbar-thumb:hover { background: #777; }

#season-pass-track {
    display: flex;
    padding: 0 120px;
    position: relative;
    align-items: center;
    height: 100%;
    min-width: max-content;

}

.track-line-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 16px;
    background: #2e3440;
    z-index: 0;
    transform: translateY(-50%);
    border-radius: 8px;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.6);
}
.track-line-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 16px;

    background: linear-gradient(90deg, #007aff, #00e5ff);
    z-index: 0;
    transform: translateY(-50%);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
    border-radius: 8px;
}

.pass-step {
    width: clamp(100px, 14vh, 160px);
    height: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.step-level-indicator {
    width: clamp(32px, 5vh, 60px);
    height: clamp(32px, 5vh, 60px);
    background: #232834;
    border: 4px solid #555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: clamp(0.9em, 1.4vh, 1.6em);
    color: #888;
    margin: clamp(8px, 2vh, 30px) 0;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.pass-step.reached .step-level-indicator {
    background: #007aff;
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 122, 255, 0.8);
    transform: scale(1.15);
}

.reward-card {
    width: clamp(70px, 12vh, 140px);
    height: clamp(70px, 12vh, 140px);
    background: linear-gradient(145deg, #333945, #252a33);
    border: 2px solid #555;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    z-index: 5;
}

.reward-card img {
    width: clamp(35px, 7vh, 80px);
    height: clamp(35px, 7vh, 80px);
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,0.6));
    transition: transform 0.3s;
}

.reward-card .qty {
    font-size: 1em;
    color: #fff;
    background: rgba(0,0,0,0.75);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.3);
    position: absolute;
    bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.reward-card.free {
    margin-bottom: 0;
}
.reward-card.premium {
    margin-top: 0;
}

.reward-card.premium {
    background: linear-gradient(145deg, #4e411b, #292206);
    border: 2px solid #ffd700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 20px rgba(255, 215, 0, 0.1);
}

.reward-card.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}
.reward-card.premium.locked {
    opacity: 0.6;
    border-color: #8a7624;
}

.reward-card.claimable {
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 10px rgba(255,255,255,0.8) inset;
    background: #434c5e;
    z-index: 100;
    animation: pulse-claim 1.5s infinite;
}
.reward-card.premium.claimable {
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.7), 0 0 15px rgba(255,215,0,0.5) inset;
    background: linear-gradient(145deg, #8a6d1c, #423408);
}

@keyframes pulse-claim {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(255,255,255,0.7); }
    100% { transform: scale(1); }
}

.reward-card.claimed {
    opacity: 0.6;
    filter: grayscale(50%);
    border-color: var(--success-color);
    background: #1b2922;
}
.reward-card.claimed::after {
    content: '✔';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5em;
    color: var(--success-color);
    background: rgba(0,0,0,0.6);
    border-radius: 18px;
    text-shadow: 0 0 15px rgba(0,0,0,0.8);
    backdrop-filter: blur(2px);
}

.premium-lock-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.6em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
    opacity: 0.9;
}

.sp-item-tooltip {
    position: fixed;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    white-space: nowrap;
    font-size: 1.2em;
    font-weight: bold;
    border: 1px solid #888;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
    display: none;
}

.season-footer-section {
    padding: 35px 60px;
    background: #151922;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
    z-index: 20;
    flex-shrink: 0;
}

.season-pass-purchase-info {
    color: #aaa;
    font-size: 1.2em;
    line-height: 1.6;
    max-width: 65%;
    font-weight: 500;
}

#btn-buy-premium-pass {
    background: linear-gradient(90deg, #ffd700, #ffaa00, #ffd700);
    background-size: 200% 100%;
    border: none;
    padding: 20px 50px;
    color: #111;
    font-weight: 900;
    font-size: 1.6em;
    border-radius: 14px;
    box-shadow: 0 0 25px rgba(255, 170, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    animation: gradient-move 3s linear infinite;
    border: 2px solid #fff;
}
#btn-buy-premium-pass:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 40px rgba(255, 170, 0, 0.6);
}
#btn-buy-premium-pass:disabled {
    background: #2c313a;
    color: #777;
    box-shadow: none;
    cursor: not-allowed;
    animation: none;
    border-color: #555;
}

@keyframes gradient-move {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.claim-all-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: 2px solid rgba(255,255,255,0.2);
    padding: 14px 32px;
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(34,197,94,0.3);
    white-space: nowrap;
    flex-shrink: 0;
}
.claim-all-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(34,197,94,0.5);
}
.claim-all-btn:disabled {
    background: #2c313a;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
    border-color: #444;
}

@media (max-width: 1024px) {
    #attendance-modal .modal-content {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        position: relative;
    }

    #attendance-modal .close-button {
        position: fixed;
        top: 15px;
        right: 15px;
        background: rgba(0,0,0,0.6);
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2em;
        color: #fff;
        z-index: 200;
        border: 1px solid rgba(255,255,255,0.3);
        backdrop-filter: blur(4px);
    }

    .season-header-section {
        display: block;
        padding: 50px 15px 15px 15px;
        background: #1b202b;
        height: auto;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        flex-shrink: 0;
    }

    .season-info-left {
        margin-bottom: 20px;
        text-align: center;
        min-width: 0;
    }

    .season-info-left h2 {
        font-size: 1.8em;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 10px;
    }

    .season-timer {
        font-size: 0.9em;
        padding: 5px 10px;
    }

    .season-progress-container {
        width: 100%;
        margin: 0 0 20px 0;
        padding: 15px;
        box-sizing: border-box;
    }

    .current-level-display {
        font-size: 1.6em;
    }

    .daily-mission-status {
        width: 100%;
        margin: 0;
        padding: 10px;
        background: rgba(0,0,0,0.2);
        min-width: 0;
    }

    .daily-mission-header {
        font-size: 1em;
        padding-bottom: 5px;
        margin-bottom: 8px;
        text-align: center;
    }

    .daily-mission-status > div:not(.daily-mission-header) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px 10px;
    }

    .daily-stat-row {
        font-size: 0.85em;
        padding: 2px 0;
        border: none;
        background: rgba(255,255,255,0.03);
        padding: 5px;
        border-radius: 4px;
    }

    .daily-stat-val {
        font-size: 0.9em;
        padding: 2px 6px;
        min-width: auto;
    }

    #season-pass-track-wrapper {
        flex: none;
        min-height: 220px;
        width: 100%;
        padding: 30px 0;
        background: #121418;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        align-items: center;
        -webkit-overflow-scrolling: touch;
    }

    #season-pass-track {
        padding: 0 20px;
        min-width: max-content;
    }

    .reward-card {
        width: 80px;
        height: 80px;
        margin: 0;
    }
    .reward-card img {
        width: 40px;
        height: 40px;
    }
    .step-level-indicator {
        margin: 12px 0;
        width: 32px;
        height: 32px;
        font-size: 0.9em;
    }
    .pass-step {
        width: 100px;
    }

    .season-footer-section {
        padding: 20px 15px;
        background: #0f1115;
        text-align: center;
        flex-shrink: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .season-pass-purchase-info {
        font-size: 0.85em;
        max-width: 100%;
        margin-bottom: 0;
    }

    #btn-buy-premium-pass {
        width: 100%;
        padding: 15px;
        font-size: 1.2em;
    }
    .claim-all-btn {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }
}

@media (max-height: 750px) {
    .season-header-section {
        padding: 20px 40px;
        gap: 20px;
    }
    .season-info-left h2 {
        font-size: 2.2em;
    }
    .season-info-left {
        gap: 8px;
        min-width: 220px;
    }
    .season-timer {
        font-size: 1em;
        padding: 6px 14px;
    }
    .season-progress-container {
        padding: 15px 30px;
        max-width: calc(500px * var(--ui-scale-modal-size));
        margin: 0 30px;
    }
    .current-level-display {
        font-size: 2.2em;
        margin-bottom: 8px;
    }
    .season-main-progress-bar {
        height: 22px;
    }
    .daily-mission-status {
        padding: 15px;
        min-width: 260px;
        font-size: 0.95em;
    }
    .daily-mission-header {
        margin-bottom: 8px;
        font-size: 1em;
    }
    .daily-stat-row {
        margin-bottom: 6px;
    }
    .season-footer-section {
        padding: 20px 40px;
    }
    #btn-buy-premium-pass {
        padding: 14px 35px;
        font-size: 1.3em;
    }
    .season-pass-purchase-info {
        font-size: 1em;
    }
}

@media (max-height: 600px) {
    .season-header-section {
        padding: 12px 30px;
        gap: 15px;
    }
    .season-info-left h2 {
        font-size: 1.6em;
    }
    .season-info-left {
        gap: 4px;
        min-width: 180px;
    }
    .season-timer {
        font-size: 0.85em;
        padding: 4px 10px;
    }
    .season-progress-container {
        padding: 10px 20px;
        max-width: calc(400px * var(--ui-scale-modal-size));
        margin: 0 15px;
    }
    .current-level-display {
        font-size: 1.6em;
        margin-bottom: 5px;
    }
    .season-main-progress-bar {
        height: 18px;
    }
    .daily-mission-status {
        padding: 10px;
        min-width: 200px;
        font-size: 0.85em;
    }
    .daily-mission-header {
        margin-bottom: 5px;
        font-size: 0.9em;
        padding-bottom: 5px;
    }
    .daily-stat-row {
        margin-bottom: 4px;
    }
    .daily-stat-val {
        padding: 2px 6px;
        min-width: 60px;
    }
    .season-footer-section {
        padding: 12px 30px;
    }
    #btn-buy-premium-pass {
        padding: 12px 28px;
        font-size: 1.1em;
    }
    .season-pass-purchase-info {
        font-size: 0.85em;
    }
    .claim-all-btn {
        padding: 10px 24px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    #attendance-modal .modal-content {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .season-header-section {
        padding: 48px 12px 12px 12px;
        gap: 10px;
    }

    .season-info-left {
        margin-bottom: 10px;
    }
    .season-info-left h2 { font-size: 1.4em; gap: 8px; }
    .season-badge { font-size: 0.35em; padding: 5px 10px; }
    .season-timer { font-size: 0.8em; padding: 4px 8px; }

    .season-progress-container { padding: 10px; margin: 0 0 10px 0; }
    .current-level-display { font-size: 1.3em; flex-wrap: wrap; justify-content: center; gap: 5px; }
    .season-main-progress-bar { height: 16px; }

    .daily-mission-status { padding: 8px; }
    .daily-mission-header { font-size: 0.9em; margin-bottom: 6px; padding-bottom: 4px; }
    .daily-stat-row { font-size: 0.8em; padding: 3px; }
    .daily-stat-val { font-size: 0.8em; padding: 2px 4px; min-width: auto; }

    #season-pass-track-wrapper {
        flex: none;
        min-height: auto;
        overflow-x: hidden;
        overflow-y: visible;
        padding: 15px 10px;
        display: block;
    }

    #season-pass-track {
        display: flex;
        flex-direction: column;
        padding: 0;
        min-width: unset;
        width: 100%;
        gap: 8px;
        align-items: stretch;
    }

    .track-line-bg,
    .track-line-fill {
        display: none;
    }

    .pass-step {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 10px;
        padding: 6px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .reward-card {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        flex-shrink: 0;
    }
    .reward-card img { width: 30px; height: 30px; margin-bottom: 2px; }
    .reward-card .qty { font-size: 0.65em; padding: 1px 5px; bottom: 3px; }
    .reward-card.claimed::after { font-size: 2em; border-radius: 10px; }

    .step-level-indicator {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
        margin: 0;
        border-width: 3px;
        flex-shrink: 0;
    }

    .premium-lock-icon { font-size: 1em; top: 4px; right: 4px; }

    .season-footer-section {
        padding: 12px 10px;
        flex-direction: column;
        gap: 8px;
        position: sticky;
        bottom: 0;
    }
    .season-pass-purchase-info { max-width: 100%; font-size: 0.8em; text-align: center; }
    #btn-buy-premium-pass { padding: 12px 20px; font-size: 1.1em; min-height: 48px; }
    .claim-all-btn { min-height: 44px; }

    .sp-convert-btn { font-size: 1em; padding: 10px 20px; }
    .sp-convert-info { font-size: 0.8em; }

    .sp-item-tooltip { display: none !important; }
}

@media (max-width: 380px) {
    .daily-mission-status > div:not(.daily-mission-header) {
        grid-template-columns: 1fr;
    }
    .reward-card { width: 65px; height: 65px; }
    .season-info-left h2 { font-size: 1.3em; }
}
