@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');

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

.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(13deg, rgba(0,165,255,0.93), rgba(114,226,47,0.54));
    z-index: -2;
}

.login-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/noise.svg');
    background-size: 200px 200px;
    opacity: 0.15;
    z-index: -1;
}

.login-page .logo-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background-image: url('../assets/cdsga-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08;
    filter: blur(2px);
    z-index: 1;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.08;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.12;
    }
}

.login-container {
    position: relative;
    z-index: 10;
}

.login-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    right: -100px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

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

.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 50px 40px;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px 0 rgba(0, 2, 65, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
        8px 8px 0px rgba(0, 2, 65, 0.15);
    font-family: 'Patrick Hand', cursive;
    position: relative;
    animation: slideIn 0.5s ease-out;
    min-width: 350px;
}

.form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4) 0%, 
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.8;
}

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

.heading {
    font-size: 28px;
    text-align: center;
    font-weight: 700;
    font-family: 'Patrick Hand', cursive;
    color: rgb(0, 2, 65);
    margin-bottom: 5px;
    text-shadow: 
        0 2px 4px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.5);
}

.subheading {
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    color: rgb(0, 2, 65);
    margin-bottom: 15px;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.form button {
    padding: 12px;
    border-radius: 10px;
    margin-top: 15px;
    background: linear-gradient(135deg, rgba(235, 255, 59, 0.9), rgba(255, 255, 100, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px rgba(0, 2, 65, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    color: rgb(0, 0, 0);
    font-size: 16px;
    font-weight: 700;
    transition: all 300ms ease;
    font-family: 'Patrick Hand', cursive;
    border: 2px solid rgba(0, 2, 65, 0.3);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 100, 0.95), rgba(235, 255, 59, 0.95));
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 2, 65, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 2, 65, 0.4);
    transition: all 300ms ease;
}

.form button:active {
    transform: translateY(0px);
    box-shadow: 
        0 2px 4px rgba(0, 2, 65, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.input {
    padding: 14px 18px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 18px;
    box-shadow: 
        0 4px 6px rgba(0, 2, 65, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    font-family: 'Patrick Hand', cursive;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 300ms ease;
    box-sizing: border-box;
    line-height: 1.5;
}

.input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 6px 12px rgba(0, 2, 65, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 0 3px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.input::placeholder {
    color: rgba(0, 0, 0, 0.5);
    font-style: italic;
    font-size: 16px;
}

input[type="password"].input::placeholder {
    font-family: 'Patrick Hand', cursive;
    letter-spacing: normal;
    font-size: 16px;
}

.forgot {
    padding-top: 10px;
    text-align: center;
}

.forgot a {
    color: rgb(0, 2, 65);
    font-family: 'Patrick Hand', cursive;
    text-decoration: none;
    transition: all 300ms ease;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.forgot a:hover {
    color: rgb(100, 50, 200);
    text-decoration: underline;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.7);
    transition: all 300ms ease;
}

.Mail,
.Password {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Patrick Hand', cursive;
    color: rgb(0, 2, 65);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.error-text {
    color: rgb(220, 38, 38);
    font-size: 13px;
    margin-top: -5px;
    font-family: 'Patrick Hand', cursive;
    font-weight: 600;
    display: none;
    background-color: rgba(220, 38, 38, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    border-left: 3px solid rgb(220, 38, 38);
}

.error-text:not(:empty) {
    display: block;
}

.error-message {
    background-color: rgba(220, 38, 38, 0.15);
    border: 3px solid rgb(220, 38, 38);
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
    color: rgb(0, 2, 65);
    font-weight: 600;
    text-align: center;
    box-shadow: 2px 3px 0px rgb(0, 2, 65);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.input.input--error {
    border-color: rgb(220, 38, 38);
    background-color: rgba(220, 38, 38, 0.05);
}

#loginButtonLoader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#loginButtonLoader .pl {
    width: 1.5em;
    height: 1.5em;
}

@media (max-width: 768px) {
    .form {
        min-width: auto;
        width: 90%;
        max-width: 400px;
        padding: 40px 30px;
    }

    .heading {
        font-size: 24px;
    }

    .shape-1,
    .shape-2,
    .shape-3 {
        display: none;
    }
    
    .login-page .logo-watermark {
        width: 400px;
        height: 400px;
        opacity: 0.06;
    }
}

@media (max-width: 480px) {
    .form {
        padding: 30px 20px;
    }

    .heading {
        font-size: 20px;
    }

    .input {
        font-size: 14px;
    }
    
    .login-page .logo-watermark {
        width: 300px;
        height: 300px;
        opacity: 0.05;
    }
}

.success-message,
.error-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Patrick Hand', cursive;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.success-message {
    background-color: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 2px solid #10b981;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 2px solid #ef4444;
}

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

.subtitle {
    font-size: 13px;
    color: #666;
    margin: -10px 0 20px 0;
    text-align: center;
    font-family: 'Patrick Hand', cursive;
}

/* Signup Steps */
.signup-step {
    animation: fadeIn 0.3s ease;
}

.signup-step h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.button-group .btn {
    flex: 1;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    border: 3px solid;
    margin-bottom: 1rem;
    font-family: 'Patrick Hand', cursive;
}

.alert-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.alert i {
    margin-right: 0.5rem;
}

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


/* Signup Form Specific Styles */
.signup-form {
    min-width: 450px;
    max-width: 500px;
}

.signup-form .heading {
    font-size: 32px;
    margin-bottom: 5px;
}

.signup-form .subheading {
    font-size: 16px;
    margin-bottom: 20px;
}

.signup-step {
    animation: fadeIn 0.4s ease;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.button-group button {
    margin-top: 0;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    border: 3px solid;
    margin-bottom: 15px;
    font-family: 'Patrick Hand', cursive;
    font-weight: 600;
    text-align: center;
    box-shadow: 3px 4px 0px rgb(0, 2, 65);
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: rgb(0, 2, 65);
}

.subtitle {
    font-size: 12px;
    color: rgba(0, 2, 65, 0.7);
    margin: -5px 0 10px 0;
    display: block;
    font-family: 'Patrick Hand', cursive;
    font-style: italic;
}

@media (max-width: 768px) {
    .signup-form {
        min-width: auto;
        width: 90%;
        max-width: 450px;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .signup-form {
        padding: 30px 20px;
    }
    
    .signup-form .heading {
        font-size: 24px;
    }
    
    .signup-form .subheading {
        font-size: 14px;
    }
}


/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Mobile Styles (320px - 480px) */
@media (max-width: 480px) {
    .login-page {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .login-page .logo-watermark {
        width: 300px;
        height: 300px;
        opacity: 0.05;
    }
    
    .login-container {
        width: 100%;
        max-width: 100%;
    }
    
    .form {
        min-width: 0;
        width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 15px;
        border-width: 2px;
        box-shadow: 
            0 4px 16px 0 rgba(0, 2, 65, 0.15),
            inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
            4px 4px 0px rgba(0, 2, 65, 0.1);
        gap: 0.75rem;
    }
    
    .heading {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .subheading {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
    }
    
    .input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-radius: 8px;
        border-width: 2px;
    }
    
    .input:focus {
        padding: 0.875rem 1rem;
    }
    
    .form button {
        padding: 0.875rem;
        font-size: 0.9375rem;
        border-radius: 8px;
        margin-top: 0.75rem;
        border-width: 2px;
    }
    
    .form button:hover {
        transform: none;
    }
    
    .form button:active {
        transform: scale(0.98);
    }
    
    .form-link {
        font-size: 0.8125rem;
        margin-top: 0.75rem;
    }
    
    .form-link a {
        font-size: 0.875rem;
    }
    
    .floating-shape {
        display: none;
    }
    
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        border-radius: 8px;
        margin-bottom: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }
    
    .form-text {
        font-size: 0.75rem;
        margin-top: 0.375rem;
    }
    
    .divider {
        margin: 1rem 0;
        font-size: 0.8125rem;
    }
    
    .btn-secondary {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Tablet Styles (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .login-page {
        padding: 2rem;
    }
    
    .login-page .logo-watermark {
        width: 400px;
        height: 400px;
        opacity: 0.06;
    }
    
    .form {
        min-width: 400px;
        padding: 2.5rem 2rem;
        border-radius: 18px;
    }
    
    .heading {
        font-size: 1.75rem;
    }
    
    .subheading {
        font-size: 0.9375rem;
    }
    
    .input {
        padding: 1rem 1.125rem;
        font-size: 1.0625rem;
    }
    
    .form button {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }
    
    .floating-shape {
        opacity: 0.5;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .login-page {
        padding: 1rem;
        align-items: center;
    }
    
    .form {
        padding: 1.5rem 2rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .heading {
        font-size: 1.375rem;
        margin-bottom: 0.25rem;
    }
    
    .subheading {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }
    
    .input {
        padding: 0.75rem 1rem;
    }
    
    .form button {
        padding: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 0.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .input {
        font-size: 16px !important;
    }
    
    .form button {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .form-link a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 0.5rem;
        margin: -0.5rem;
    }
}

/* Small Mobile (320px) */
@media (max-width: 360px) {
    .form {
        padding: 1.5rem 1rem;
    }
    
    .heading {
        font-size: 1.375rem;
    }
    
    .subheading {
        font-size: 0.75rem;
    }
    
    .input {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }
    
    .form button {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .form,
    .floating-shape,
    .logo-watermark {
        animation: none;
    }
    
    .form button:hover {
        transform: none;
    }
    
    .form button:active {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form {
        border-width: 3px;
        border-color: rgba(0, 0, 0, 0.5);
    }
    
    .input {
        border-width: 2px;
        border-color: rgba(0, 0, 0, 0.4);
    }
    
    .form button {
        border-width: 3px;
        border-color: rgba(0, 0, 0, 0.5);
    }
}


/* Cloudflare Turnstile CAPTCHA Styles */
.cf-turnstile {
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.cf-turnstile iframe {
    border-radius: 8px;
}
