/**
 * ION Login Modal - Beautiful frameless centered dialog
 */

.ion-login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.2s ease;
}

.ion-login-modal-overlay.active {
    display: flex;
}

.ion-login-modal {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: #262626;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.ion-login-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ion-login-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.ion-login-content {
    text-align: center;
}

.ion-login-logo img {
    height: 100px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.ion-login-heading {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.ion-login-subtitle {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 30px;
    font-weight: 400;
}

.ion-login-logo {
    margin-bottom: 9px;
    display: flex;
    justify-content: center;
}

.ion-login-title {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 32px 0;
    font-family: system-ui, -apple-system, sans-serif;
}

.ion-login-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.ion-login-google-btn,
.ion-login-discord-btn {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.ion-login-google-btn:hover,
.ion-login-discord-btn:hover { 
    background: rgba(255, 255, 255, 0.1); 
}

.ion-login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.ion-login-divider::before,
.ion-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.ion-login-divider span {
    padding: 0 16px;
}

.ion-login-input-group { margin-bottom: 20px; }

.ion-login-input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.ion-login-input-group input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.ion-login-input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ion-login-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.ion-login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.ion-login-back-btn {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.ion-login-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.ion-otp-section {
    animation: fadeIn 0.3s ease;
}

.ion-otp-sent-msg {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.ion-otp-sent-msg strong {
    color: #f59e0b;
}

.ion-otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.ion-otp-digit {
    width: 48px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.ion-otp-digit:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    transform: scale(1.05);
}

.ion-login-error {
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 14px;
    display: none;
}

.ion-login-error:not(:empty) {
    display: block;
    animation: shake 0.3s ease;
}

.ion-login-join { color: #cccccc; font-size: 14px; margin-top: 26px; }
.ion-login-join a { color: #896948; font-weight: 600; text-decoration: none; }
.ion-login-join a:hover { text-decoration: underline; }

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .ion-login-modal {
        width: 95%;
        padding: 32px 24px;
    }
    
    .ion-otp-digit {
        width: 42px;
        height: 50px;
        font-size: 20px;
    }
    
    .ion-otp-inputs {
        gap: 8px;
    }
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}