/* Login Page Styles */
.login-page {
    font-family: "Poppins", sans-serif;
    overflow-x: hidden;
}

.login-main {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background with gradient and pattern */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.login-background__gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

.login-background__pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0.6;
}

/* Login Section */
.login-section {
    position: relative;
    z-index: 1;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideUp 0.6s ease-out;
    max-width: 450px;
    margin: 0 auto;
}

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

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.5);
}

.login-card__header {
    text-align: center;
    padding: 1.5rem 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.login-card__header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.login-logo {
    width: 120px;
    height: 80px;
    margin: 0 auto 0.75rem;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 0.5rem;
}

.login-logo__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
    font-family: "Nunito", sans-serif;
}

.login-subtitle {
    font-size: 0.85rem;
    opacity: 0.95;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.login-card__body {
    padding: 1.75rem 2rem 1.5rem;
}

/* Alert Styling */
.login-alert {
    border-radius: 10px;
    border: none;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
    animation: slideDown 0.3s ease-out;
    font-size: 0.875rem;
}

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

/* Form Styling */
.login-form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.form-label i {
    color: #667eea;
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper--password {
    display: flex;
    align-items: center;
}

.login-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2d3748;
    width: 100%;
}

.login-input--password {
    padding-right: 3rem;
}

.login-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
    background: #ffffff;
}

.login-input::placeholder {
    color: #a0aec0;
}

.login-input:valid {
    border-color: #48bb78;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    padding: 0.375rem;
    border: none;
    background: transparent;
    z-index: 10;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

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

.password-toggle i {
    font-size: 1.1rem;
}

/* Login Button */
.login-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.login-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 ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

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

.login-btn__text {
    position: relative;
    z-index: 1;
}

.login-btn__icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.login-btn:hover .login-btn__icon {
    transform: translateX(4px);
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 1rem 0 0.75rem;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
}

.login-divider span {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    padding: 0 1rem;
    color: #718096;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Demo Accounts */
.demo-accounts {
    margin-top: 0.5rem;
}

.demo-toggle {
    width: 100%;
    text-align: center;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-toggle:hover {
    background: #f7fafc;
    color: #764ba2;
}

.demo-toggle i:last-child {
    transition: transform 0.3s ease;
}

.demo-toggle[aria-expanded="true"] i:last-child {
    transform: rotate(180deg);
}

.demo-credentials {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 10px;
    animation: fadeIn 0.3s ease-out;
}

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

.demo-account-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e2e8f0;
}

.demo-account-item:last-child {
    margin-bottom: 0;
}

.demo-account-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.demo-account-badge {
    min-width: 70px;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-account-badge.admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.demo-account-badge.teacher {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.demo-account-badge.student {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.demo-account-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.demo-account-info strong {
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 600;
}

.demo-account-info span {
    color: #718096;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

/* Remove HTML5 validation styling */
.login-input:invalid {
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card__header {
        padding: 2rem 1.5rem 1.25rem;
    }

    .login-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }

    .login-logo i {
        font-size: 2rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.875rem;
    }

    .login-card__body {
        padding: 2rem 1.5rem;
    }

    .login-card {
        border-radius: 20px;
    }
}

@media (max-width: 576px) {
    .login-section {
        padding: 1rem 0.5rem;
    }

    .login-card__header {
        padding: 1.75rem 1.25rem 1rem;
    }

    .login-card__body {
        padding: 1.75rem 1.25rem;
    }

    .login-title {
        font-size: 1.35rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }
}

/* Loading State */
.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn:disabled:hover {
    transform: none;
}

/* Accessibility */
.login-input:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.login-btn:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}
