/* CRITICAL MODAL FIXES - Add this to your style.css */

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* CRITICAL: Modal Active State */
.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

/* Modal Content */
.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    animation: slideUp 0.3s ease;
}

/* Close Button */
.modal .close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    color: #00ccff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal .close:hover {
    color: #fff;
    background: rgba(255, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-form h2 {
    color: #00ccff;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.auth-form p {
    color: #b8b8d1;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Form Inputs */
.auth-form input,
.auth-form select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: #00ccff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Form Buttons */
.auth-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #00ccff, #0099ff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
}

.auth-form button[type="submit"]:active {
    transform: translateY(0);
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 255, 255, 0.3));
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
    background: linear-gradient(to left, transparent, rgba(0, 255, 255, 0.3));
}

/* LinkedIn Button */
.btn-linkedin {
    width: 100%;
    padding: 0.9rem;
    background: #0077b5;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-linkedin:hover {
    background: #005885;
    transform: translateY(-2px);
}

/* Auth Links */
.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links a {
    color: #00ccff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-links p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

/* Auth Messages */
.auth-message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
    animation: slideDown 0.3s ease;
}

.auth-message.error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.auth-message.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Language Dropdown */
.language-selector {
    position: relative;
}

.lang-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ccff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(0, 255, 255, 0.2);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #1a1a2e;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.lang-dropdown button {
    display: block;
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-dropdown button:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #00ccff;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
    }
    
    .modal .close {
        right: 1rem;
        top: 1rem;
        font-size: 1.5rem;
    }
}
