/*
|--------------------------------------------------------------------------
| SETTINGS
|--------------------------------------------------------------------------
*/

.admin-settings {

    margin-top: 28px;
}

/*
|--------------------------------------------------------------------------
| GLOBAL FIXES
|--------------------------------------------------------------------------
*/

* {

    box-sizing: border-box;
}

.admin-settings *,
.admin-level-rewards-center *,
.admin-level-reward-modal * {

    min-width: 0;
}

.admin-settings button,
.admin-settings input,
.admin-settings select {

    font-family: inherit;
}

.admin-settings {

    overflow-x: hidden;
}

/*
|--------------------------------------------------------------------------
| CARD
|--------------------------------------------------------------------------
*/

.admin-settings-card {

    padding:
        30px;

    border-radius: 32px;

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    backdrop-filter:
        blur(14px);
}

/*
|--------------------------------------------------------------------------
| TITLE
|--------------------------------------------------------------------------
*/

.admin-settings-title {

    color: var(--text-color);

    font-size: clamp(22px, 2vw, 28px);

    font-weight: 900;

    line-height: 1.2;

    word-break: break-word;
}

/*
|--------------------------------------------------------------------------
| GRID
|--------------------------------------------------------------------------
*/

.admin-settings-grid {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(280px, 1fr)
        );

    gap: 22px;

    margin-top: 26px;
}

/*
|--------------------------------------------------------------------------
| FIELD
|--------------------------------------------------------------------------
*/

.admin-settings-field {

    display: flex;

    flex-direction: column;

    gap: 10px;
}

.admin-settings-field label {

    color:
        rgba(255,255,255,0.45);

    font-size: 13px;

    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| COLOR PICKER
|--------------------------------------------------------------------------
*/

.admin-settings-field input[type='color'] {

    width: 100%;
    height: 58px;

    padding: 6px;

    border: none;
    border-radius: 18px;

    background:
        rgba(255,255,255,0.04);

    border:
        1px solid var(--card-border);

    cursor: pointer;
}

/*
|--------------------------------------------------------------------------
| THEME PREVIEW
|--------------------------------------------------------------------------
*/

.admin-theme-preview {

    margin-top: 34px;
}

.admin-theme-preview-card {

    padding:
        24px;

    border-radius: 28px;

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);
}

.admin-theme-preview-title {

    color:
        rgba(255,255,255,0.42);

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1px;
}

.admin-theme-preview-box {

    margin-top: 18px;

    height: 120px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            var(--primary-color, var(--primary-color)),
            var(--secondary-color, var(--secondary-color))
        );

    color: #FFFFFF;

    font-size: 28px;

    font-weight: 900;

    box-shadow:
        0 0 40px rgba(255,52,52,0.16);
}

/*
|--------------------------------------------------------------------------
| SAVE BUTTON
|--------------------------------------------------------------------------
*/

.admin-settings-save {

    width: 100%;
    height: 60px;

    margin-top: 30px;

    border: none;
    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            #FF2020
        );

    color: #FFFFFF;

    font-size: 15px;

    font-weight: 900;

    cursor: pointer;

    transition:
        0.22s ease;
}

.admin-settings-save:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 0 30px rgba(255,52,52,0.22);
}

/*
|--------------------------------------------------------------------------
| RESPONSIVE
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .admin-settings-card {

        padding:
            22px;
    }

    .admin-settings-grid {

        grid-template-columns:
            1fr;
    }

    .admin-theme-preview-box {

        height: 100px;

        font-size: 22px;
    }

    .admin-settings-save {

        height: 56px;
    }
}

/*
|--------------------------------------------------------------------------
| LOGO UPLOAD
|--------------------------------------------------------------------------
*/

#projectLogo {

    width: 100%;

    padding:
        16px;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.04);

    border:
        1px solid var(--card-border);

    color:
        rgba(255,255,255,0.7);

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        0.22s ease;
}

#projectLogo:hover {

    border:
        1px solid color-mix(
            in srgb,
            var(--primary-color) 45%,
            transparent
        );

    background:
        rgba(255,255,255,0.06);

    box-shadow:
        0 0 30px color-mix(
            in srgb,
            var(--primary-color) 12%,
            transparent
        );
}

/*
|--------------------------------------------------------------------------
| FILE BUTTON
|--------------------------------------------------------------------------
*/

#projectLogo::file-selector-button {

    margin-right: 14px;

    padding:
        12px
        18px;

    border: none;
    border-radius: 14px;

    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            var(--primary-color)
        );

    color: #FFFFFF;

    font-size: 13px;

    font-weight: 800;

    cursor: pointer;

    transition:
        0.22s ease;
}

#projectLogo::file-selector-button:hover {

    transform:
        translateY(-1px);

    filter:
        brightness(1.08);
}

/*
|--------------------------------------------------------------------------
| SUBTITLE
|--------------------------------------------------------------------------
*/

.admin-settings-subtitle {

    margin-top: 34px;

    color: var(--text-color);

    font-size: 18px;

    font-weight: 900;
}

/*
|--------------------------------------------------------------------------
| COLORS
|--------------------------------------------------------------------------
*/

.admin-settings-colors {

    margin-top: 30px;
}

.admin-colors-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-top: 18px;
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .admin-colors-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .admin-colors-grid {

        grid-template-columns:
            1fr;
    }
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    #projectLogo {

        padding:
            14px;

        font-size: 13px;
    }

    #projectLogo::file-selector-button {

        width: 100%;

        margin:
            0 0 12px 0;
    }
}

/*
|--------------------------------------------------------------------------
| LEVEL REWARDS
|--------------------------------------------------------------------------
*/

.admin-level-rewards-list {

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(300px, 1fr)
        );

    gap: 22px;

    margin-top: 24px;

    align-items: start;
}

/*
|--------------------------------------------------------------------------
| CARD
|--------------------------------------------------------------------------
*/

.admin-level-reward-card {

    padding: 24px;

    border-radius: 28px;

    min-height: 100%;
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.04),
            rgba(255,255,255,0.02)
        );

    border:
        1px solid var(--card-border);

    transition:
        0.22s ease;
}

.admin-level-reward-card:hover {

    transform:
        translateY(-3px);

    border:
        1px solid rgba(255,52,52,0.12);

    box-shadow:
        0 0 30px rgba(255,52,52,0.08);
}

/*
|--------------------------------------------------------------------------
| TOP
|--------------------------------------------------------------------------
*/

.admin-level-reward-top {

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.admin-level-reward-level {

    color: #FFFFFF;

    font-size: 22px;

    font-weight: 900;
}

.admin-level-reward-id {

    margin-top: 6px;

    color:
        rgba(255,255,255,0.38);

    font-size: 12px;

    font-weight: 700;
}

.admin-level-reward-icon {

    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background:
        rgba(255,255,255,0.04);

    color: var(--primary-color);

    font-size: 20px;
}

/*
|--------------------------------------------------------------------------
| STATS
|--------------------------------------------------------------------------
*/

.admin-level-reward-stats {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 16px;

    margin-top: 24px;
}

.admin-level-reward-stat {

    padding: 18px;

    border-radius: 18px;

    background:
        rgba(255,255,255,0.03);

    border:
        1px solid rgba(255,255,255,0.05);
}

.admin-level-reward-stat span {

    color:
        rgba(255,255,255,0.42);

    font-size: 11px;

    font-weight: 800;
}

.admin-level-reward-stat strong {

    display: block;

    margin-top: 8px;

    color: #FFFFFF;

    font-size: clamp(18px, 2vw, 24px);

    font-weight: 900;

    line-height: 1.2;

    word-break: break-word;
}

/*
|--------------------------------------------------------------------------
| BUTTON
|--------------------------------------------------------------------------
*/

.admin-edit-level-reward,
.admin-create-level-reward {

    width: 100%;
    height: 56px;

    margin-top: 24px;

    border: none;

    border-radius: 18px;

    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            #FF2020
        );

    color: #FFFFFF;

    font-size: 13px;

    font-weight: 900;

    cursor: pointer;
}

/*
|--------------------------------------------------------------------------
| MODAL
|--------------------------------------------------------------------------
*/

.admin-level-reward-modal-overlay {

    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(0,0,0,0.72);

    backdrop-filter:
        blur(12px);

    opacity: 0;

    visibility: hidden;

    transition:
        0.22s ease;

    z-index: 999999;
}

.admin-level-reward-modal-overlay.show {

    opacity: 1;

    visibility: visible;
}

.admin-level-reward-modal {

    width: 620px;

    max-width: 100%;

    padding: 30px;

    border-radius: 32px;

    overflow: hidden;

    background:
        #0D0D0D;

    border:
        1px solid var(--card-border);
}

.admin-level-reward-modal-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 18px;

    margin-top: 24px;
}

.admin-level-reward-modal-actions {

    display: flex;

    gap: 12px;

    margin-top: 28px;
}

.admin-save-level-reward-modal,
.admin-delete-level-reward-modal {

    flex: 1;

    height: 58px;

    border: none;

    border-radius: 18px;

    color: #FFFFFF;

    font-size: 13px;

    font-weight: 900;

    cursor: pointer;
}

.admin-save-level-reward-modal {

    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            #FF2020
        );
}

.admin-delete-level-reward-modal {

    background:
        rgba(255,255,255,0.05);

    border:
        1px solid rgba(255,255,255,0.08);
}

/*
|--------------------------------------------------------------------------
| OPEN LEVEL REWARDS CARD
|--------------------------------------------------------------------------
*/

.admin-open-level-rewards-card {

    margin-top: 34px;

    padding: 26px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(255,52,52,0.12),
            rgba(255,255,255,0.03)
        );

    border:
        1px solid var(--card-border);

    overflow: hidden;

    position: relative;
}

.admin-open-level-rewards-card::before {

    content: '';

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at top right,
            rgba(255,52,52,0.18),
            transparent 45%
        );

    pointer-events: none;
}

.admin-open-level-rewards-left {

    display: flex;

    align-items: center;

    gap: 18px;

    position: relative;

    z-index: 2;
}

.admin-open-level-rewards-icon {

    width: 72px;
    height: 72px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 24px;

    background:
        rgba(255,255,255,0.06);

    color: var(--primary-color);

    font-size: 28px;

    box-shadow:
        0 0 30px rgba(255,52,52,0.12);
}

.admin-open-level-rewards-title {

    color: #FFFFFF;

    font-size: 24px;

    font-weight: 900;
}

.admin-open-level-rewards-description {

    margin-top: 6px;

    color:
        rgba(255,255,255,0.45);

    font-size: 14px;

    font-weight: 700;
}

.admin-open-level-rewards-button {

    width: 220px;
    height: 60px;

    border: none;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            var(--primary-color),
            #FF2020
        );

    color: #FFFFFF;

    font-size: 14px;

    font-weight: 900;

    cursor: pointer;

    position: relative;

    z-index: 2;

    transition:
        0.22s ease;
}

.admin-open-level-rewards-button:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 0 30px rgba(255,52,52,0.22);
}

/*
|--------------------------------------------------------------------------
| LEVEL REWARDS CENTER
|--------------------------------------------------------------------------
*/

.admin-level-rewards-center-overlay {

    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        rgba(0,0,0,0.82);

    backdrop-filter:
        blur(14px);

    z-index: 999999;

    opacity: 0;

    visibility: hidden;

    transition:
        0.22s ease;
}

.admin-level-rewards-center-overlay.show {

    opacity: 1;

    visibility: visible;
}

.admin-level-rewards-center {

    width: 1400px;

    max-width: 100%;

    height: 85vh;

    overflow-y: auto;

    padding: 34px;

    border-radius: 34px;

    background:
        #090909;

    border:
        1px solid var(--card-border);
}

.admin-level-rewards-center-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}

.admin-level-rewards-center-text {

    margin-top: 8px;

    color:
        rgba(255,255,255,0.42);

    font-size: 14px;

    font-weight: 700;
}

.admin-close-level-rewards-center {

    width: 58px;
    height: 58px;

    border: none;

    border-radius: 18px;

    background:
        rgba(255,255,255,0.04);

    border:
        1px solid var(--card-border);

    color: #FFFFFF;

    font-size: 18px;

    cursor: pointer;

    transition:
        0.22s ease;
}

.admin-close-level-rewards-center:hover {

    background:
        rgba(255,255,255,0.08);

    transform:
        rotate(90deg);
}

.admin-level-rewards-center-actions {

    margin-top: 28px;
}

/*
|--------------------------------------------------------------------------
| INPUT FIXES
|--------------------------------------------------------------------------
*/

.admin-input,
.admin-select {

    width: 100%;

    height: 58px;

    padding:
        0 18px;

    border-radius: 18px;

    background:
        rgba(255,255,255,0.04);

    border:
        1px solid var(--card-border);

    color: #FFFFFF;

    font-size: 14px;

    font-weight: 700;

    outline: none;

    transition:
        0.22s ease;
}

/*
|--------------------------------------------------------------------------
| BUTTON FIXES
|--------------------------------------------------------------------------
*/

.admin-settings button {

    white-space: nowrap;
}

@media (max-width: 768px) {

    .admin-settings button {

        white-space: normal;
    }
}

.admin-input:focus,
.admin-select:focus {

    border:
        1px solid rgba(255,52,52,0.35);

    box-shadow:
        0 0 0 4px rgba(255,52,52,0.08);
}

.admin-input::placeholder {

    color:
        rgba(255,255,255,0.28);
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .admin-open-level-rewards-card {

        flex-direction: column;

        align-items: flex-start;
    }

    .admin-open-level-rewards-button {

        width: 100%;
    }

    .admin-level-rewards-center {

        height: 100vh;

        border-radius: 0;

        padding: 24px;
    }

    .admin-level-rewards-center-header {

        display: flex;

        align-items: flex-start;

        justify-content: space-between;

        gap: 20px;

        flex-wrap: wrap;
    }
}

/*
|--------------------------------------------------------------------------
| FINAL MOBILE FIXES
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .admin-level-reward-modal-grid {

        grid-template-columns:
            1fr;
    }

    .admin-level-reward-modal-actions {

        flex-direction: column;
    }

    .admin-level-reward-stats {

        grid-template-columns:
            1fr;
    }

    .admin-level-reward-top {

        gap: 16px;

        align-items: flex-start;
    }

    .admin-open-level-rewards-left {

        width: 100%;
    }

    .admin-open-level-rewards-title {

        font-size: 20px;
    }
}

/*
|--------------------------------------------------------------------------
| LIGHT THEME
|--------------------------------------------------------------------------
*/

body.theme-light .admin-settings-field label {

    color:
        var(--text-muted);
}

body.theme-light .admin-theme-preview-title {

    color:
        var(--text-muted);
}

/*
|--------------------------------------------------------------------------
| LOGO UPLOAD
|--------------------------------------------------------------------------
*/

body.theme-light #projectLogo {

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    color:
        var(--text-color);
}

body.theme-light #projectLogo:hover {

    background:
        var(--card-background-hover);
}

/*
|--------------------------------------------------------------------------
| LEVEL REWARD CARDS
|--------------------------------------------------------------------------
*/

body.theme-light .admin-level-reward-card {

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);
}

body.theme-light .admin-level-reward-level {

    color:
        var(--text-color);
}

body.theme-light .admin-level-reward-id {

    color:
        var(--text-muted);
}

body.theme-light .admin-level-reward-icon {

    background:
        rgba(255,52,52,0.08);
}

/*
|--------------------------------------------------------------------------
| REWARD STATS
|--------------------------------------------------------------------------
*/

body.theme-light .admin-level-reward-stat {

    background:
        rgba(0,0,0,0.03);

    border:
        1px solid var(--card-border);
}

body.theme-light .admin-level-reward-stat span {

    color:
        var(--text-muted);
}

body.theme-light .admin-level-reward-stat strong {

    color:
        var(--text-color);
}

/*
|--------------------------------------------------------------------------
| MODALS
|--------------------------------------------------------------------------
*/

body.theme-light .admin-level-reward-modal {

    background:
        var(--modal-background);

    border:
        1px solid var(--card-border);
}

body.theme-light .admin-level-rewards-center {

    background:
        var(--background-secondary);

    border:
        1px solid var(--card-border);
}

body.theme-light .admin-level-rewards-center-text {

    color:
        var(--text-muted);
}

/*
|--------------------------------------------------------------------------
| CLOSE BUTTON
|--------------------------------------------------------------------------
*/

body.theme-light .admin-close-level-rewards-center {

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    color:
        var(--text-color);
}

body.theme-light .admin-close-level-rewards-center:hover {

    background:
        rgba(255,52,52,0.08);

    color:
        var(--primary-color);
}

/*
|--------------------------------------------------------------------------
| INPUTS
|--------------------------------------------------------------------------
*/

body.theme-light .admin-input,
body.theme-light .admin-select {

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    color:
        var(--text-color);
}

body.theme-light .admin-input::placeholder {

    color:
        var(--text-muted);
}

/*
|--------------------------------------------------------------------------
| LEVEL REWARD DELETE BUTTON
|--------------------------------------------------------------------------
*/

body.theme-light .admin-delete-level-reward-modal {

    background:
        var(--card-background);

    border:
        1px solid var(--card-border);

    color:
        var(--text-color);
}

body.theme-light .admin-delete-level-reward-modal:hover {

    background:
        var(--card-background-hover);

    border-color:
        rgba(255,52,52,0.25);
}

/*
|--------------------------------------------------------------------------
| OPEN REWARDS CARD
|--------------------------------------------------------------------------
*/

body.theme-light .admin-open-level-rewards-title {

    color:
        var(--text-color);
}

body.theme-light .admin-open-level-rewards-description {

    color:
        var(--text-muted);
}