/* Login Popup Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-popup {
    background: linear-gradient(135deg, rgba(30, 42, 58, 0.95) 0%, rgba(45, 74, 62, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: 25px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.login-overlay.active .login-popup {
    transform: scale(1) translateY(0);
}

.login-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 10;
}

.login-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
    transform: scale(1.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.login-logo .power {
    color: #4ade80;
}

.login-logo .bet {
    color: white;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 16px;
    margin-bottom: 5px;
}

.login-welcome {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.login-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-tab {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #94a3b8;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.login-tab.active {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.login-tab:not(.active):hover {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.05);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 5px;
}

.password-toggle:hover {
    color: #4ade80;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remember-me:hover {
    color: white;
}

.remember-checkbox {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.remember-checkbox.checked {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #4ade80;
}

.remember-checkbox i {
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
}

.remember-checkbox.checked i {
    opacity: 1;
}

.forgot-password {
    color: #4ade80;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #22c55e;
    text-decoration: underline;
}

.login-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.6);
}

.login-button:active {
    transform: translateY(0);
}

.login-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-button .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.login-button.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.social-login {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-title {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 15px;
}

.social-buttons {
    display: flex;
    gap: 10px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.social-btn.google:hover {
    border-color: rgba(66, 133, 244, 0.5);
    background: rgba(66, 133, 244, 0.1);
}

.social-btn.facebook:hover {
    border-color: rgba(24, 119, 242, 0.5);
    background: rgba(24, 119, 242, 0.1);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
    animation: shake 0.5s ease-in-out;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.success-message {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.success-message.show {
    display: block;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .login-popup {
        padding: 20px;
        margin: 10px;
        border-radius: 20px;
    }
    
    .login-logo {
        font-size: 24px;
    }
    
    .login-welcome {
        font-size: 16px;
    }
    
    .form-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .login-button {
        padding: 12px;
        font-size: 14px;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 375px) {
    .login-popup {
        padding: 15px;
    }
    
    .login-tabs {
        margin-bottom: 20px;
    }
    
    .login-tab {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* Animation for popup entrance */
@keyframes popupSlideIn {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.login-popup.animate-in {
    animation: popupSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}