* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(180deg, #0a0e27 0%, #1a237e 30%, #283593 60%, #3949ab 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Animated stars background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.star:nth-child(odd) {
    animation-delay: 1s;
}

.star:nth-child(even) {
    animation-delay: 2s;
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Shooting stars */
.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, transparent, white, transparent);
    border-radius: 50%;
    animation: shoot 3s linear infinite;
    opacity: 0;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, white, transparent);
    transform: translate(-50%, -50%) rotate(-45deg);
    transform-origin: left center;
}

@keyframes shoot {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(300px) translateY(300px);
    }
}

.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 50px 40px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

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

.logo-section {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
    display: block;
}

.logo-section h1 {
    color: #2d3748;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-top: 10px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f7fafc;
    color: #2d3748;
}

.form-group input:hover {
    border-color: #cbd5e0;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.error-message {
    background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
    color: #c53030;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    border-left: 4px solid #e53e3e;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.15);
    animation: shake 0.5s ease;
}

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

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .login-container {
        max-width: 100%;
    }

    .login-box {
        padding: 40px 30px;
        border-radius: 16px;
    }

    .logo {
        margin-bottom: 20px;
    }

    .logo-section {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }

    .logo-section h1 {
        font-size: 24px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px; /* Touch target size */
        border-radius: 8px;
    }

    .btn-login {
        padding: 16px;
        font-size: 15px;
        min-height: 52px; /* Larger touch target */
        border-radius: 8px;
    }

    .error-message {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-box {
        padding: 35px 25px;
        border-radius: 16px;
    }

    .logo-section {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    .logo-section h1 {
        font-size: 22px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group input {
        padding: 13px 15px;
        min-height: 46px;
    }

    .btn-login {
        padding: 15px;
        min-height: 50px;
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .login-box {
        padding: 30px 20px;
    }

    .logo-section h1 {
        font-size: 20px;
    }
}

/* Touch-friendly improvements */
a, button {
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.3);
}

/* Focus visible for accessibility */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Copyright styling */
.copyright {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

.copyright a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copyright a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .copyright {
        font-size: 12px;
        margin-top: 20px;
        padding-top: 15px;
    }
}

@media (max-width: 480px) {
    .copyright {
        font-size: 11px;
        margin-top: 15px;
        padding-top: 15px;
    }
}

