/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111;
    background: linear-gradient(180deg, #bfe6ff 0%, #f3f7fb 35%, #ffe2cf 70%, #ffb07a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Card */
.card {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* Logo */
.logo {
    margin-bottom: 24px;
}

.logo-img {
    max-width: 250px;
    max-height: 250px;
    width: auto;
    height: auto;
}

/* Typography */
h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.subtitle {
    color: #333;
    font-size: 14px;
    margin-bottom: 28px;
}

/* Auth toggle */
.auth-toggle {
    display: flex;
    background: rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: #fff;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-btn:hover:not(.active) {
    color: #333;
}

/* Forms */
.auth-form {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.auth-form input {
    padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
}

.auth-form input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.auth-form input::placeholder {
    color: #999;
}

/* Buttons */
.btn-primary {
    background: #007AFF;
    color: #fff;
    border: 1px solid #007AFF;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #0056CC;
    border-color: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

/* Messages */
.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.error-message {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.success-message {
    background: #E8F5E8;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

/* Inline form error container */
.form-error {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #FFEBEE; /* light red */
    color: #C62828;      /* red text */
    border: 1px solid #FFCDD2;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    margin-top: 40px;
    font-size: 12px;
    color: #222;
    background: rgba(0,0,0,0.12);
    padding: 10px 12px;
    border-radius: 8px;
}
