:root {
    --primary-gradient: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
    --secondary-gradient: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
    --bg-gradient: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --input-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --error-color: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin: 10px;
}

.login-box {
    background: rgba(255, 255, 255, 0.03);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-header {
    text-align: center;
    margin-bottom: clamp(20px, 4vw, 30px);
}

.login-header h1 {
    font-size: clamp(24px, 5vw, 28px);
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 5px 0;
}

.login-header p {
    color: var(--text-secondary);
    font-size: clamp(12px, 3vw, 14px);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: clamp(12px, 3vw, 14px);
}

.error-message i {
    margin-right: 8px;
    font-size: clamp(14px, 3vw, 16px);
}

.form-group {
    margin-bottom: clamp(15px, 4vw, 20px);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    font-size: clamp(14px, 3vw, 16px);
}

input {
    width: 100%;
    padding: clamp(12px, 3vw, 15px) 15px clamp(12px, 3vw, 15px) 45px;
    border: none;
    background: var(--input-bg);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: clamp(13px, 3vw, 14px);
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

input::placeholder {
    color: var(--text-secondary);
}

button {
    width: 100%;
    padding: clamp(12px, 3vw, 15px);
    background: var(--secondary-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 118, 230, 0.3);
}

button i {
    transition: transform 0.3s ease;
    font-size: clamp(14px, 3vw, 16px);
}

button:hover i {
    transform: translateX(5px);
}

/* Mobile Optimization */
@media (max-width: 480px) {
    body {
        background: var(--bg-gradient);
        padding: 0;
        margin: 0;
        min-height: 100vh;
    }

    .login-container {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 0;
        height: 100vh;
        display: flex;
        align-items: center;
    }

    .login-box {
        width: 100%;
        padding: 20px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 15px;
        margin: 0;
    }

    .login-header h1 {
        font-size: 45px;
        margin-bottom: 8px;
    }

    .login-header p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .input-group input {
        width: 100%;
        padding: 12px 15px 12px 45px;
        font-size: 16px;
        height: 45px;
    }

    .input-group i {
        font-size: 18px;
    }

    .remember-me-container {
        margin: 15px 0;
    }

    .remember-me {
        gap: 8px;
    }

    .checkbox, .checkmark {
        width: 20px;
        height: 20px;
    }

    .remember-text {
        font-size: 14px;
    }

    button {
        height: 45px;
        font-size: 16px;
        padding: 0;
    }

    button i {
        font-size: 16px;
    }

    .error-message {
        padding: 10px;
        font-size: 14px;
        margin-bottom: 15px;
    }
}

/* Prevent zoom on input focus for iOS */
@media screen and (max-width: 480px) {
    input[type="text"],
    input[type="password"] {
        font-size: 16px !important;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        height: auto;
        padding: 20px;
    }

    .login-box {
        padding: 15px;
    }

    .login-header {
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .remember-me-container {
        margin: 10px 0;
    }
}

/* Remember Me Checkbox Styling */
.remember-me-container {
    margin: 15px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox {
    position: relative;
    width: 18px;
    height: 18px;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background: var(--input-bg);
    border: 2px solid var(--text-primary);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox input:checked ~ .checkmark {
    background: var(--secondary-gradient);
    border-color: transparent;
}

.checkbox input:checked ~ .checkmark:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    font-size: 12px;
}

.remember-text {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s ease;
}

.remember-me:hover .remember-text {
    color: var(--text-primary);
}

.remember-me:hover .checkmark {
    border-color: var(--text-primary);
    opacity: 0.8;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .remember-me-container {
        margin: 10px 0;
    }
    
    .checkbox, .checkmark {
        width: 16px;
        height: 16px;
    }
    
    .remember-text {
        font-size: 13px;
    }
}