/* ============================================
   Authentication Components CSS
   Login, Register, and Password Reset styles
   ============================================ */

/* Auth Base Styles */
.auth-login {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.auth-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 1rem 2rem rgba(0,0,0,.1) !important;
}

/* Logo Container */
.auth-logo-container {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.auth-logo-container:hover {
    transform: scale(1.05);
}

/* Form Inputs */
.auth-input {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.auth-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 65, 104, 0.15);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.auth-input:valid {
    border-color: var(--bs-success);
}

.auth-input.is-valid {
    border-color: var(--bs-success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 4.94-4.94L8.9 1.8 3.24 7.45 1.15 5.36l.94-.94z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

.auth-input.is-invalid {
    border-color: var(--bs-danger);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 5.5 1 1m0 0 1 1m-1-1 1-1m-1 1-1 1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

/* Password Toggle Button */
.auth-password-toggle {
    border: none;
    background: none;
    padding: 8px;
    z-index: 3;
}

.auth-password-toggle:hover {
    background: none;
    border: none;
}

.auth-password-toggle:focus {
    box-shadow: none;
    border: none;
}

/* Submit Button */
.auth-submit-btn {
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 65, 104, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    transform: none;
    cursor: not-allowed;
}

/* Social Login Buttons */
.auth-social-btn {
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 60px;
}

.auth-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Background Particles */
.auth-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.auth-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--bs-primary);
    border-radius: 50%;
    animation: authParticleFloat 8s ease-in-out infinite;
    opacity: 0.1;
}

.auth-particle-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    width: 8px;
    height: 8px;
}

.auth-particle-2 {
    top: 80%;
    left: 85%;
    animation-delay: 2s;
    width: 12px;
    height: 12px;
}

.auth-particle-3 {
    top: 30%;
    left: 90%;
    animation-delay: 4s;
    width: 6px;
    height: 6px;
}

.auth-particle-4 {
    top: 70%;
    left: 5%;
    animation-delay: 1s;
    width: 10px;
    height: 10px;
}

.auth-particle-5 {
    top: 50%;
    left: 50%;
    animation-delay: 3s;
    width: 8px;
    height: 8px;
}

/* Info Card */
.auth-info-card {
    transition: transform 0.3s ease;
}

.auth-info-card:hover {
    transform: translateY(-5px);
}

/* Form Labels */
.auth-form label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

/* Alert Styles */
.auth-form .alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
}

/* Check Input Styling */
.auth-form .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.auth-form .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(31, 65, 104, 0.15);
}

/* Link Styling */
.auth-form a {
    transition: color 0.3s ease;
}

.auth-form a:hover {
    color: var(--bs-secondary) !important;
}

/* Music Footer Animation */
.auth-music-footer i {
    animation: musicNote 2s ease-in-out infinite;
}

.auth-music-footer i:nth-child(3) {
    animation-delay: 1s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        margin: 20px;
        padding: 2rem !important;
    }
    
    .auth-logo-container {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .auth-input {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .auth-submit-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .auth-social-btn {
        padding: 10px 16px;
        min-width: 50px;
    }
    
    .auth-social-btn span {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .auth-info-card {
        margin: 10px;
        padding: 1.5rem !important;
    }
    
    .auth-info-card .col-4 {
        margin-bottom: 1rem;
    }
}

/* Dark Theme Adjustments */
[data-bs-theme="dark"] .auth-login {
    background: var(--bg-primary);
}

[data-bs-theme="dark"] .auth-card {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .auth-input {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .auth-input:focus {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .auth-particle {
    background: var(--bs-secondary);
}

/* Animations */
@keyframes authParticleFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.3;
    }
}

@keyframes musicNote {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-5px);
    }
}

/* Loading State */
.auth-btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Validation Enhancement */
.invalid-feedback {
    display: block !important;
    font-size: 0.875rem;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--bs-danger);
}

.valid-feedback {
    display: block !important;
    font-size: 0.875rem;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: rgba(25, 135, 84, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--bs-success);
}

/* Focus Ring Enhancement */
.auth-form input:focus,
.auth-form button:focus {
    outline: none;
}

/* Hover Effects for Interactive Elements */
.auth-form .form-check-label:hover {
    color: var(--bs-primary);
    cursor: pointer;
}

/* ============================================
   Registration Page Specific Styles
   ============================================ */

/* Registration Section */
.auth-register {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

/* User Type Selection */
.btn-check:checked + .btn-outline-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    transform: scale(1.02);
}

.btn-outline-primary {
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(31, 65, 104, 0.2);
}

/* User Type Cards */
.user-type-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Password Requirements */
.password-requirements {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.password-requirements .requirement.text-success {
    color: var(--bs-success) !important;
}

.password-requirements .requirement.text-danger {
    color: var(--bs-danger) !important;
}

/* Teacher Information Section */
.teacher-fields {
    transition: all 0.3s ease;
    border-radius: 12px;
    background: var(--bg-secondary);
    padding: 20px;
    margin: 16px 0;
    border: 1px solid var(--border-color);
}

/* Form Select Styling */
.form-select.auth-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
}

/* Terms and Conditions Styling */
.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:focus {
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(31, 65, 104, 0.15);
}

/* Enhanced Submit Button for Registration */
.auth-register .auth-submit-btn {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #2851a3 100%);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-register .auth-submit-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: left 0.5s;
}

.auth-register .auth-submit-btn:hover::before {
    left: 100%;
}

.auth-register .auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(31, 65, 104, 0.3);
}

.auth-register .auth-submit-btn:disabled {
    background: var(--text-muted);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.auth-register .auth-submit-btn:disabled::before {
    display: none;
}

/* Additional Info Card Enhancement */
.auth-register .card.bg-primary {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #2851a3 100%) !important;
    border: none;
    overflow: hidden;
    position: relative;
}

.auth-register .card.bg-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}

/* Responsive Adjustments for Registration */
@media (max-width: 768px) {
    .auth-register .auth-card {
        margin: 20px 0;
        padding: 30px 20px !important;
    }
    
    .teacher-fields,
    .student-fields {
        padding: 15px;
    }
    
    .password-requirements {
        padding: 10px 12px;
    }
    
    .btn-outline-primary {
        padding: 12px 8px !important;
    }
    
    .btn-outline-primary small {
        font-size: 0.75rem;
    }
}

/* Loading State Enhancements */
.auth-btn-loader .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Form Validation Enhanced Styling */
.auth-register .form-control.is-invalid {
    border-color: var(--bs-danger);
    background-image: none;
}

.auth-register .form-control.is-valid {
    border-color: var(--bs-success);
    background-image: none;
}

/* Music Theme Enhancements */
.auth-register .auth-music-footer {
    margin-top: 24px;
}

.auth-register .auth-music-footer i {
    animation: musical-note 2s ease-in-out infinite;
}

@keyframes musical-note {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.auth-register .auth-music-footer i:nth-child(odd) {
    animation-delay: 0.5s;
}