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

:root {
    --login-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --login-container-bg: #2d2d2d;
    --login-text: #e0e0e0;
    --login-subtitle: #b0b0b0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--login-bg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.3s;
}

.login-container {
    background: var(--login-container-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    transition: background 0.3s;
}

h1 {
    color: var(--login-text);
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

.subtitle {
    color: var(--login-subtitle);
    text-align: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.login-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.login-type-btn {
    flex: 1;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-type-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.login-type-btn.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.login-type-icon {
    font-size: 24px;
}

.login-type-label {
    color: var(--login-text);
    font-size: 14px;
    font-weight: 500;
}

.login-section {
    animation: fadeIn 0.3s ease;
}

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

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

label {
    display: block;
    color: var(--login-text);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--login-subtitle);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    background: var(--login-container-bg);
    color: var(--login-text);
}

[data-theme="dark"] input[type="password"] {
    border-color: #404040;
}

input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

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

.error {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.error.show {
    display: block;
}

.success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.success.show {
    display: block;
}

.biometric-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 15px;
    display: none;
}

.biometric-btn.visible {
    display: block;
}

.biometric-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.4);
}

.biometric-btn:active {
    transform: translateY(0);
}

.separator {
    display: none;
    text-align: center;
    margin: 15px 0;
    color: var(--login-subtitle);
    font-size: 14px;
}

.separator.visible {
    display: block;
}

.separator::before,
.separator::after {
    content: '';
    display: inline-block;
    width: 30%;
    height: 1px;
    background: var(--login-subtitle);
    vertical-align: middle;
    margin: 0 10px;
}

.phantom-info {
    color: var(--login-subtitle);
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.phantom-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #AB9FF2 0%, #8B7FF2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.phantom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(171, 159, 242, 0.5);
}

.phantom-btn:active {
    transform: translateY(0);
}

.phantom-icon {
    width: 28px;
    height: 28px;
}

.phantom-note {
    color: var(--login-subtitle);
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    opacity: 0.8;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--login-container-bg);
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal h2 {
    color: var(--login-text);
    margin-bottom: 15px;
    font-size: 20px;
}

.modal p {
    color: var(--login-subtitle);
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

.modal-buttons .btn-secondary {
    background: #555;
}

.modal-buttons .btn-secondary:hover {
    background: #666;
    box-shadow: none;
    transform: none;
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .login-type-btn {
        padding: 12px 8px;
    }
    
    .login-type-icon {
        font-size: 20px;
    }
    
    .login-type-label {
        font-size: 12px;
    }
}
