/* Login Popup Styles - Mevcut login sayfasıyla uyumlu */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: var(--bg-card, rgba(5, 10, 25, 0.95));
    border: 1px solid rgba(30, 40, 80, 0.3);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(0, 10, 30, 0.3);
    z-index: 1;
}

.login-modal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0a1a30, #152848, #1e2040, #0a1a30);
    z-index: -1;
    border-radius: 22px;
    filter: blur(10px);
    opacity: 0.6;
    animation: glowing 30s linear infinite;
}

.login-modal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 90%, rgba(255, 255, 255, 0.1) 0%, transparent 20%);
    z-index: -1;
    border-radius: 20px;
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.login-modal-overlay.active .login-modal {
    transform: scale(1) translateY(0);
}

.login-modal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-modal .title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 3rem;
    font-family: 'Exo 2', sans-serif;
    background: linear-gradient(to right, #2a4a80, #3a5a9a, #4a6aba);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(30, 60, 120, 0.5);
    position: relative;
}

.login-modal .title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, #1a3a70, #2a4a80);
    border-radius: 3px;
}

.login-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.login-modal-close:hover {
    color: var(--primary-color);
    background: rgba(66, 220, 255, 0.1);
    transform: rotate(90deg);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.login-modal .form-group {
    margin-bottom: 2rem;
    position: relative;
}

.login-modal label {
    display: block;
    margin-bottom: 0.8rem;
    color: #3a5a9a;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.login-modal input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    background: rgba(5, 10, 25, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    outline: none;
}

.login-modal input[type="text"]:focus {
    border-color: #0096ff;
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.3);
    background: rgba(5, 10, 25, 0.9);
}

.login-modal input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Server Selector Styles - Mevcut login sayfasıyla aynı */
.login-modal .login-custom-select-container {
    position: relative;
    width: 100%;
}

.login-modal .login-select-selected {
    width: 100%;
    padding: 15px 20px;
    background: rgba(5, 10, 25, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.login-modal .login-select-selected:hover {
    border-color: #0096ff;
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.3);
}

.login-modal .login-select-selected .login-server-flag {
    margin-right: 10px;
}

.login-modal .server-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 10px;
}

.login-modal .login-select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 10, 25, 0.95);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 8px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-modal .login-select-hide {
    display: none;
}

.login-modal .login-select-search {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 150, 255, 0.2);
}

.login-modal .login-select-search input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(5, 10, 25, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

.login-modal .login-select-group {
    border-bottom: 1px solid rgba(0, 150, 255, 0.1);
}

.login-modal .login-select-group:last-child {
    border-bottom: none;
}

.login-modal .login-select-group-title {
    padding: 8px 15px;
    background: rgba(0, 150, 255, 0.1);
    color: #0096ff;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.login-modal .login-select-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin: 5px 5px 0 5px;
}

.login-modal .login-select-item:hover {
    background: rgba(0, 150, 255, 0.1);
}

.login-modal .login-select-item.selected {
    background: rgba(0, 150, 255, 0.2);
    color: #0096ff;
}

/* Help Icon and Popup */
.login-modal .help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #0096ff;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 5px;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
}

.login-modal .help-icon:hover {
    background: #00aaff;
    transform: scale(1.1);
}

.login-modal .help-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 10, 25, 0.98);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    margin-top: 5px;
    backdrop-filter: blur(10px);
}

.login-modal .help-popup-content h3 {
    color: #0096ff;
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-modal .help-popup-content p {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.login-modal .help-popup-content p:last-child {
    margin-bottom: 0;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.form-checkbox label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.login-modal .btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(45deg, #1a3a70, #2a4a80);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.login-modal .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.login-modal .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 58, 112, 0.4);
}

.login-modal .btn:hover::before {
    left: 100%;
}

.login-modal .btn:active {
    transform: translateY(0);
}

.login-modal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-button .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    padding: 0 20px;
}

.discord-login-button {
    padding: 15px 30px;
    background: #5865F2;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.discord-login-button:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.3);
}

.login-help {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-help-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-help-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-help-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.login-help-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.login-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

.login-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.login-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.login-message.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.login-message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .login-modal {
        padding: 30px 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }

    .login-modal-title {
        font-size: 1.5rem;
    }

    .form-input,
    .form-select {
        padding: 12px 15px;
    }

    .login-button,
    .discord-login-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-modal {
        padding: 25px 15px;
        margin: 15px;
        width: calc(100% - 30px);
    }

    .login-modal-title {
        font-size: 1.3rem;
    }

    .login-modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}

/* Animation for modal entrance */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-modal-overlay.active .login-modal {
    animation: modalSlideIn 0.3s ease-out;
}

/* Loading state */
.login-form.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-form.loading .form-input,
.login-form.loading .form-select,
.login-form.loading .login-button {
    pointer-events: none;
}

/* === Login Popup - Submenu (Alt Sunucular) Görünümü === */

/* Alt liste kapsayıcısı (zaten eklediysen aynen kalsın) */
.login-modal .login-submenu {
    background-color: rgb(2 8 32);
    border: 1px solid #ffa500;
    border-top: 0;
    margin: -5px 5px 10px 5px;
    display: none;
}

/* Alt liste olan parent item (üst kenarlık) */
.login-modal .login-select-item.with-sub {
    border: 1px solid #ffa500;
    border-bottom: 0;
}

/* Alt listede görünür öğe varsa göster */
.login-modal .login-submenu:has(> div:not([style*="display:none"])) {
    display: block;
}

/* ALT ÖĞE STİLİ — eksik olan buydu */
.login-modal .login-select-item.submenu-item {
    padding: 10px 30px;
    margin: 5px 5px 0 5px;     /* üstte parent ile hizalı */
    display: flex;
    align-items: center;
}

/* Alt öğedeki bayrak daha küçük olsun */
.login-modal .login-submenu .login-select-item .server-flag,
.login-modal .login-select-item.submenu-item .server-flag {
    width: 15px;
    height: 10px;
}

/* Alt öğe metni daha küçük */
.login-modal .login-submenu .login-select-item span,
.login-modal .login-select-item.submenu-item span {
    font-size: 12px;
}

/* Parent ve Sub için ayrı highlight sınıfları */
.login-modal .highlight-parent {
    background-color: rgba(0, 150, 255, 0.12);
}

.login-modal .highlight-sub {
    background-color: rgba(0, 150, 255, 0.2);
}


/* Altında öğe kalmayan parent’ta border’ı kaldır (önceden eklediysen kalsın) */
.login-modal .no-border { border: 0 !important; }

/* Server kodu ve ayırıcı çizgi (önceden eklediysen kalsın) */
.login-modal .server-code {
    font-size: 12px;
    color: #b5b5b5;
    position: relative;
}
.login-modal .server-code:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background: #888;
    margin: 0 5px;
    vertical-align: middle;
    transform: translateY(-1px);
}
