body {
    overflow: hidden; /* Prevent scrolling on auth pages */
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(-45deg, var(--primary-blue), var(--accent-blue), var(--accent-purple), var(--accent-light), var(--accent-bright));
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

.auth-form-container {
    background: rgba(26, 27, 59, 0.6);
    padding: 3rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.auth-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    width: 100px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(107, 70, 193, 0.4));
    transition: transform 0.3s ease;
}

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

.auth-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    background: linear-gradient(
        135deg,
        var(--text-color-1) 0%,
        var(--text-color-2) 50%,
        var(--text-color-1) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glowingText 3s ease-in-out infinite,
              textGradient 6s linear infinite;
}

.form-group {
    margin-bottom: 1.2rem;
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    padding-left: 2.5rem; /* Add space for icon */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: var(--text-color-3);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.form-group .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color-3);
    transition: color 0.3s ease;
}

.form-group input:focus + .input-icon {
    color: var(--accent-light);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-purple);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2.8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-light));
    z-index: -1;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.4s ease;
}

.btn-submit:hover {
    background-color: var(--accent-light);
    box-shadow: 
        0 12px 30px rgba(139, 92, 246, 0.4),
        0 6px 20px rgba(107, 70, 193, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.btn-submit:hover::after {
    opacity: 1;
}

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

.auth-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.auth-links p {
    color: var(--text-color-3);
    margin-top: 1rem;
}

/* Mobile responsive for auth pages */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .auth-container {
        padding: 1rem;
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .auth-form-container {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }

    .auth-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .auth-logo {
        width: 80px;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-form-container {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }

    .auth-title {
        font-size: 1.4rem;
    }

    .form-group input {
        padding: 0.85rem;
        padding-left: 2.5rem;
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .btn-submit {
        padding: 0.85rem;
        font-size: 1rem;
    }
}


/* ===== Login Page Styles (matches Datacloud Now) ===== */

@keyframes login-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

@keyframes login-shimmer {
    0% { transform: translateX(-200%) rotate(45deg); }
    100% { transform: translateX(200%) rotate(45deg); }
}

@keyframes login-text-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 30, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.2rem;
}

.login-overlay p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0;
}

.login-spinner-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #0078d4;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
}

.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(-45deg, #1a1b3b, #2563eb, #6b46c1, #8b5cf6, #7c3aed, #1a1b3b, #2563eb);
    background-size: 400% 400%;
    animation: login-gradient-shift 15s ease infinite;
}

.login-card {
    background: rgba(26, 27, 59, 0.6);
    padding: 3rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.login-logo {
    width: 100px;
    margin: 0 auto 1.5rem;
    display: block;
    filter: drop-shadow(0 0 15px rgba(107, 70, 193, 0.4));
    transition: transform 0.3s ease;
}

.login-card:hover .login-logo {
    transform: scale(1.1);
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 120, 212, 0.12);
    border: 1px solid rgba(0, 120, 212, 0.25);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1.2rem;
    font-size: 0.78rem;
    color: #60a5fa;
    font-weight: 500;
}

.login-title {
    font-size: 2rem;
    margin: 0 0 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: login-text-gradient 6s ease-in-out infinite;
}

.login-info-box {
    background: rgba(0, 120, 212, 0.08);
    border: 1px solid rgba(0, 120, 212, 0.2);
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-info-box p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.6;
}

.login-info-box strong {
    color: rgba(255, 255, 255, 0.85);
}

.login-id-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    font-family: inherit;
}

.login-id-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: login-shimmer 2.8s ease-in-out infinite;
    z-index: 1;
}

.login-id-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #106ebe 0%, #005a9e 100%);
    box-shadow: 0 8px 24px rgba(0, 120, 212, 0.45);
    transform: translateY(-2px);
}

.login-id-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-id-btn > * {
    position: relative;
    z-index: 2;
}

.login-btn-spin {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: login-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.4rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.login-divider span {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    white-space: nowrap;
}

.login-request-btn {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 0.85rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-request-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.35);
    color: #a78bfa;
}

.login-footer {
    margin-top: 1.5rem;
}

.login-footer p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

.login-footer a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }

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

    .login-logo {
        width: 80px;
    }
}
