/**
 * Login Styles for Legend Card Hub
 * 
 * This stylesheet contains all styles for the login/signup modal
 * that can be included across all pages.
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* Login Modal Container */
.login-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

/* Login Modal */
.login-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    position: relative;
    border: 3px solid #FFD93D;
    animation: modalAppear 0.5s ease-out;
}

@keyframes modalAppear {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Modal Border Glow Effect */
.login-modal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEAA7);
    border-radius: 25px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Close Button */
.login-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.login-close-btn:hover {
    transform: scale(1.1);
    background: #FF6B6B;
    color: white;
}

/* Form Container */
#login-form-container,
#signup-form-container {
    padding: 40px;
    position: relative;
}

/* Pokemon Header */
.pokemon-header {
    text-align: center;
    margin-bottom: 10px;
}

.pokemon-logo {
    font-size: 32px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Toggle Container */
.toggle-container {
    display: flex;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    border-radius: 50px;
    padding: 5px;
    margin: 0 40px 20px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    border-radius: 25px;
    z-index: 2;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.toggle-btn.active {
    color: #333;
    text-shadow: none;
}

.toggle-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background: linear-gradient(135deg, #FFD93D, #FF6B6B);
    border-radius: 25px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-slider.signup {
    transform: translateX(100%);
}

/* Form Title */
.form-title {
    text-align: center;
    margin-bottom: 20px;
    color: #2C3E50;
    font-size: 25px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Group */
.form-group {
    margin-bottom: 15px;
    position: relative;
}

/* Form Input */
.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 3px solid transparent;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #FF6B6B;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3);
}

.form-input::placeholder {
    color: #7F8C8D;
    font-weight: 500;
}

/* Password Container */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.password-toggle:hover {
    transform: translateY(-50%) scale(1.2);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4, #45B7D1);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    animation: buttonGlow 2s ease-in-out infinite alternate;
}

@keyframes buttonGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* Forgot Password */
.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: #E74C3C;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.forgot-password a:hover {
    color: #C0392B;
    text-shadow: 0 2px 4px rgba(192, 57, 43, 0.3);
}

/* Login/Logout Buttons in Navigation */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

#login-btn,
#logout-btn {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

#login-btn {
    background: linear-gradient(135deg, #4ECDC4, #45B7D1);
    color: white;
    border: none;
}

#logout-btn {
    background: linear-gradient(135deg, #FF6B6B, #E74C3C);
    color: white;
    border: none;
    display: none; /* Hidden by default */
}

#login-btn:hover,
#logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#user-display {
    font-weight: 700;
    color: #2C3E50;
    display: none; /* Hidden by default */
}

/* Animation for input glow */
@keyframes inputGlow {
    0% { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 8px 16px rgba(255, 107, 107, 0.4), 0 0 20px rgba(255, 107, 107, 0.2); }
    100% { box-shadow: 0 8px 16px rgba(255, 107, 107, 0.3); }
}

/* Sparkle animation for successful actions */
@keyframes sparkleFloat {
    0% { transform: translateY(0) scale(0); opacity: 1; }
    50% { transform: translateY(-100px) scale(1); opacity: 1; }
    100% { transform: translateY(-200px) scale(0); opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-modal {
        max-width: 90%;
    }
    
    .toggle-container {
        margin: 0 20px 20px;
    }
    
    #login-form-container,
    #signup-form-container {
        padding: 30px 20px;
    }
}