body {
    background: linear-gradient(180deg, #1a3f5c 0%, #2BA0FF 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(1px 1px at 10% 10%, white 1px, transparent 0),
        radial-gradient(1px 1px at 20% 20%, white 1px, transparent 0),
        radial-gradient(1px 1px at 30% 30%, white 1px, transparent 0),
        radial-gradient(1px 1px at 40% 40%, white 1px, transparent 0),
        radial-gradient(2px 2px at 50% 50%, white 1px, transparent 0);
    background-size: 400px 400px;
    animation: stars 60s linear infinite;
    opacity: 0.5;
}

body::after {
    content: '';
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60%;
    background: 
        linear-gradient(135deg, transparent 0%, #1a3f5c 50%),
        linear-gradient(225deg, #2BA0FF 0%, transparent 50%),
        linear-gradient(315deg, #1a3f5c 0%, transparent 50%);
    z-index: 1;
}

@keyframes stars {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-400px);
    }
}

.meteor {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    opacity: 0;
    animation: meteor 6s linear infinite;
    transform: rotate(-45deg);
}

.meteor::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, white, transparent);
    transform: translateX(-50px);
}

@keyframes meteor {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-45deg);
    }
    10%, 90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(300px, 300px) rotate(-45deg);
    }
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container img {
    max-height: 60px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-control {
    height: 45px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.btn-primary {
    background: #2BA0FF;
    border: none;
    padding: 12px 0;
    font-weight: 500;
    width: 100%;
}

.btn-primary:hover {
    background: #1a90ef;
}

.alert {
    border-radius: 4px;
    margin-bottom: 20px;
}

.toggle-password,
.toggle-password-confirm {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.toggle-password:hover,
.toggle-password-confirm:hover {
    color: #2BA0FF;
}

.terms-notice {
    text-align: center;
    font-size: small;
    color: #6c757d;
    margin-bottom: 1rem;
}

.terms-notice a {
    color: #2BA0FF;
    text-decoration: none;
}

.terms-notice a:hover {
    text-decoration: underline;
}

.auth-heading {
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
}

.auth-description {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    padding: 0 20px;
    line-height: 1.5;
}

.auth-link {
    color: #2BA0FF;
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .auth-container {
        width: 90%;
        padding: 30px 20px;
        margin: 20px;
    }

    .auth-heading {
        font-size: 20px;
    }

    .auth-description {
        font-size: 13px;
        padding: 0 10px;
    }

    .logo-container img {
        max-height: 50px;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 15px;
    }

    .auth-container {
        padding: 20px 15px;
    }

    .form-control {
        height: 40px;
        font-size: 14px;
    }

    .btn-primary {
        padding: 10px 0;
    }

    .terms-notice {
        font-size: 12px;
    }

    .g-recaptcha {
        transform: scale(0.9);
        transform-origin: left center;
    }
}

/* Add minimum height for very small devices */
@media screen and (max-height: 600px) {
    body {
        min-height: 100vh;
        height: auto;
        padding: 20px 0;
    }
}

/* Add these touch-friendly input styles */
@media (hover: none) and (pointer: coarse) {
    .form-control {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .toggle-password,
    .toggle-password-confirm {
        padding: 10px; /* Larger touch target */
    }

    /* Improve button touch targets */
    .btn-primary {
        min-height: 44px;
    }

    /* Adjust checkbox size for touch */
    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}

/* Fix for devices in landscape mode */
@media screen and (max-height: 480px) and (orientation: landscape) {
    body {
        align-items: flex-start;
    }

    .auth-container {
        margin: 20px auto;
    }
}

/* Fix for ultra-wide screens */
@media screen and (min-width: 1400px) {
    .auth-container {
        max-width: 450px;
    }
}

/* Fix for very small screens */
@media screen and (max-width: 320px) {
    .auth-container {
        width: 100%;
        margin: 10px;
        padding: 15px 10px;
    }
}
