﻿*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #007AFF;
    --secondary: #32D74B;
    --error: #FF453A;
    --background: #F5F5F7;
    --card-bg: #FFFFFF;
    --text: #1D1D1F;
    --text-secondary: #86868B;
    --border: #E5E5EA;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, #007AFF 0%, #0040DD 100%);
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 24px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    animation: fadeIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.university-brand {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    width: 120px;
    height: calc(120px / 1.13857677903);
    object-fit: contain;
}

.title {
    font-size: 20px;
    font-weight: 600;
    margin: 8px 0;
    color: var(--text);
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
    font-weight: 400;
}

.input-group {
    width: 100%;
    position: relative;
    padding: 0;
}

.input-wrapper {
    margin-bottom: 20px;
}

.floating-label input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    font-size: 16px;
    transition: all 0.2s ease;
    display: block;
    margin: 0;
    line-height: 1.5; /* Ensure text is vertically centered */
}

    .floating-label input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
    }

.floating-label label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
    background: var(--card-bg);
    padding: 0 8px;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 0;
    left: 16px;
    font-size: 13px;
    color: var(--primary);
    background: var(--card-bg);
}

.error-help {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.3s ease;
    display: none; /* Hide errors initially */
}

    .error-help i {
        font-size: 0.9rem;
        flex-shrink: 0;
    }

.has-error {
    border-color: var(--error) !important;
}

    .has-error label {
        color: var(--error) !important;
    }

    .has-error input:focus {
        box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15) !important;
    }

.error-help span {
    display: block;
    margin-top: 0.2rem;
}

.submit-btn {
    margin-top: 10px;
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

    .submit-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .submit-btn:not(:disabled):hover {
        opacity: 0.9;
        transform: scale(0.98);
    }

    .submit-btn .fa-spinner {
        margin-right: 8px;
        font-size: 20px;
    }

.recaptcha-container {
    min-height: 78px; /* Default height for larger screens */
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .card {
        padding: 24px; /* Reduced padding for smaller screens */
    }

    .recaptcha-container {
        height: auto;
        transform: scale(0.9);
        display: flex;
        justify-content: center;
        align-items: center;
        transform-origin: center top;
    }

    .container {
        padding: 16px; /* Reduced container padding for smaller screens */
    }

    .title {
        font-size: 18px; /* Smaller title font size */
    }

    .subtitle {
        font-size: 14px; /* Smaller subtitle font size */
    }

    .floating-label input {
        padding: 12px; /* Reduced input padding */
    }

    .submit-btn {
        padding: 14px; /* Reduced button padding */
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media query for mobile screens */


/* Add these to existing CSS */
.submit-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.dialog {
    animation: fadeIn 0.3s ease;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

.spinner {
    display: none;
    position: absolute;
}

    .spinner.visible {
        display: block;
    }

.submit-btn:disabled {
    opacity: 0.7;
}

/* Add these styles to your existing CSS */
/* Add these styles to your existing CSS */
.dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

    .dialog.visible {
        display: flex;
    }

.dialog-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

@media (min-width: 600px) {
    .dialog-content {
        width: 480px; /* Match card width on larger screens */
    }
}

.dialog-icon {
    font-size: 2.5rem;
    color: #ff453a;
    margin-bottom: 1rem;
}

    .dialog-icon.recaptcha {
        color: #FFA500; /* Orange color for reCAPTCHA errors */
    }

.dialog-message {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.dialog-close {
    background: #007AFF;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.submit-btn {
    position: relative;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
