:root {
    --master-red: #e02025;
    --master-red-dark: #b01a1e;
    --master-black: #000000;
    --master-gray-dark: #1a1a1a;
    --master-gray: #333333;
    --master-white: #ffffff;
    --master-gray-light: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--master-black) 0%, var(--master-gray-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
}

.container {
    width: 100%;
    max-width: 450px;
    background: var(--master-white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    position: relative;
    z-index: 10;
    margin: auto;
}

.logo-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-header img {
    max-width: 260px;
    height: auto;
    margin-bottom: 0.75rem;
}

.logo-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--master-black);
    margin: 0;
}

.logo-header p {
    font-size: 0.9rem;
    color: #666;
    margin: 0.4rem 0 0 0;
}

h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--master-black);
    margin-bottom: 1.5rem;
    text-align: center;
}

h1 i {
    color: var(--master-red);
    margin-right: 0.5rem;
}

p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.error-message,
.success-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.error-message.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #b45309;
    border-left-color: #b45309;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid #059669;
}

form {
    margin-bottom: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    font-weight: 500;
    color: var(--master-gray);
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
}

label i {
    color: var(--master-red);
    margin-right: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--master-white);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--master-red);
    box-shadow: 0 0 0 3px rgba(224, 32, 37, 0.1);
}

input[type="submit"],
.btn,
button[type="submit"] {
    width: 100%;
    background: var(--master-red);
    color: var(--master-white) !important;
    border: none;
    padding: 0.8rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none !important;
}

input[type="submit"]:hover,
.btn:hover,
button[type="submit"]:hover {
    background: var(--master-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(224, 32, 37, 0.3);
}

input[type="submit"]:disabled,
button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--master-gray) !important;
}

.btn-secondary:hover {
    background: var(--master-black) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.password-strength {
    margin-top: 0.4rem;
    height: 4px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    background: #ef4444;
}

.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background: #10b981;
}

.password-requirements {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.password-requirements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

.password-requirements .requirement {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0;
}

.requirement i {
    font-size: 0.55rem;
    color: #d1d5db;
    flex-shrink: 0;
}

.requirement span {
    line-height: 1.3;
}

.requirement.met {
    color: #10b981;
}

.requirement.met i {
    color: #10b981;
}

.auth-links {
    text-align: center;
    margin-top: 1.25rem;
}

.auth-links p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.separator {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: #9ca3af;
}

.separator-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.separator-text {
    padding: 0 1rem;
    font-size: 0.8rem;
}

.nav-link,
.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--master-red);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover,
.auth-link:hover {
    color: var(--master-red-dark);
    transform: translateX(3px);
}

.forgot-password-link {
    display: block;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    margin-top: 0.875rem;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--master-red);
}

@media (max-height: 800px) {
    body {
        padding: 1.5rem 2rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    .logo-header {
        margin-bottom: 1.25rem;
    }
    
    .logo-header img {
        max-width: 220px;
        margin-bottom: 0.5rem;
    }
    
    .logo-header h1 {
        font-size: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 1.75rem 1.5rem;
    }

    .logo-header img {
        max-width: 200px;
    }

    h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    .container {
        padding: 1.5rem 1.25rem;
    }

    .logo-header img {
        max-width: 180px;
    }

    h1 {
        font-size: 1.3rem;
    }
    
    .password-requirements-grid {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
}