#settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: min(90%, 720px);
    height: min(85%, 600px);
    background: linear-gradient(145deg, #27272a 0%, #18181b 100%);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.02),
        0 25px 50px -12px rgba(0, 0, 0, 0.1),
        0 0 100px rgba(0, 0, 0, 0.05);
}

#settings-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.05);
}


.site-ban-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #fffafa 0%, #fff0f0 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    flex-direction: column;
}

.site-ban-overlay.active {
    display: flex;
}

.site-ban-icon {
    font-size: 120px;
    margin-bottom: 30px;
    color: #ef4444;
    animation: banPulse 1.5s ease-in-out infinite;
}

@keyframes banPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.site-ban-title {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 20px;
}

.site-ban-reason {
    font-size: 20px;
    color: #b91c1c;
    line-height: 1.6;
    text-align: center;
    max-width: 600px;
    margin-bottom: 30px;
}

.site-ban-info {
    font-size: 14px;
    color: #999;
}


.site-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 18, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    backdrop-filter: blur(10px);
}

.site-warning-overlay.active {
    display: flex;
}

.site-warning-box {
    background: linear-gradient(135deg, #1e1b4b 0%, #1e1b4b 100%);
    border: 2px solid #f59e0b;
    border-radius: 20px;
    padding: 50px;
    max-width: 550px;
    text-align: center;
    box-shadow: 0 0 80px rgba(245, 158, 11, 0.2);
    animation: warningGlow 2s ease-in-out infinite;
}

@keyframes warningGlow {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(245, 158, 11, 0.1);
    }

    50% {
        box-shadow: 0 0 100px rgba(245, 158, 11, 0.2);
    }
}

.site-warning-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.site-warning-title {
    font-size: 36px;
    font-weight: bold;
    color: #f59e0b;
    margin-bottom: 20px;
}

.site-warning-message {
    font-size: 18px;
    color: #b45309;
    line-height: 1.6;
    margin-bottom: 35px;
}

.site-warning-dismiss {
    padding: 16px 50px;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.site-warning-dismiss:hover {
    background: #fbbf24;
    transform: scale(1.05);
}


#notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(30px);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.05);
}

#notification-panel.active {
    transform: translateX(-400px);
}

.notif-header {
    padding: 30px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notif-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
    color: #fff;
}

.notif-close {
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
}

.notif-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.notif-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.notif-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0 16px 0;
}

.notif-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: transform 0.2s, background 0.2s;
}

.notif-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.notif-item .title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.notif-item .desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.notif-item .date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 8px;
}

.changelog-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.announcement-tag {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.notif-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 40px 0;
    font-size: 0.9rem;
}

#notification-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#notification-overlay.active {
    display: block;
    opacity: 1;
}


#tos-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(20px);
    z-index: 2000005;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#tos-overlay.active {
    display: flex;
    opacity: 1;
}

.tos-modal {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
    transform: translateY(30px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#tos-overlay.active .tos-modal {
    transform: translateY(0);
}

.tos-header {
    margin-bottom: 24px;
}

.tos-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: #3b82f6;
    display: inline-block;
}

.tos-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.8px;
    color: #fff;
}

.tos-content {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    padding-right: 12px;
    margin-bottom: 30px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.tos-content::-webkit-scrollbar {
    width: 6px;
}

.tos-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.tos-section {
    margin-bottom: 24px;
}

.tos-section h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tos-section p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 0;
}

.tos-footer {
    margin-top: auto;
    display: flex;
    gap: 12px;
}

.tos-accept-btn,
.tos-decline-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tos-accept-btn {
    background: #000;
    color: #fff;
}

.tos-decline-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tos-accept-btn:hover {
    background: #3b82f6;
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.tos-decline-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

#privacy-popover {
    position: absolute;
    top: 45px;
    left: 0;
    width: 300px;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    z-index: 10000;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    /* Triangle pointing up */
}

#privacy-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #18181b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

#privacy-popover.active {
    display: flex;
    animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.privacy-header-small {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.privacy-body-small p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

#auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(30px);
    z-index: 2000010;
    /* Above TOS */
    display: none;
    align-items: center;
    justify-content: center;
}

.auth-modal {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.auth-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 12px;
    width: 100%;
}

.auth-btn {
    background: #fff;
    color: #000;
    font-weight: 700;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    margin-top: 12px;
    transition: 0.2s;
}

.auth-btn:hover {
    transform: scale(1.02);
    background: #eee;
}

.auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
    color: #3b82f6;
    cursor: pointer;
}

.auth-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: none;
    text-align: center;
}