:root {
    --primary-color: #4a6bff;
    --secondary-color: #f8f9fa;
    --error-color: #ff4a4a;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7ff;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease-out;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.flash-message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    animation: fadeOut 4s forwards;
}
.flash-message.error {
    background-color: #ffe5e5;
    color: #a00;
}
.flash-message.success {
    background-color: #e5ffe5;
    color: #0a0;
}
@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

.error {
    color: var(--error-color);
    background-color: #ffeeee;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid var(--error-color);
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

label {
    font-weight: 600;
    color: #555;
}

input, select {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

button:hover {
    background-color: #3a5bef;
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-links a:hover {
    text-decoration: underline;
    color: #3a5bef;
}

.notice {
    background-color: #eaf1ff;
    border: 1px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--text-color);
    animation: fadeIn 0.5s ease-out;
}
.notice strong {
    color: var(--primary-color);
}

.password-wrapper {
    position: relative;
    display: inline-block;
}

.password-wrapper input {
    padding-right: 40px;
}

.toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toggle-btn:hover {
    opacity: 1;
    color: #000;
}

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

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 20px auto;
    }

    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    input, select, button {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    form {
        gap: 15px;
    }

    label {
        font-size: 14px;
    }

    input, select {
        font-size: 14px;
    }
}

.input-error {
  border: 2px solid red;
  background-color: #ffe6e6;
}