/*
 * Modern, Responsive Authentication Form Styles
 * By Gemini
 */

/* --- Fonts & Base --- */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

:root {
    --primary-color-start: #667eea;
    --primary-color-end: #764ba2;
    --font-family: 'Vazir', sans-serif;
    --text-color: #333;
    --light-text-color: #555;
    --error-color: #d93025;
    --success-color: #1a73e8;
    --input-bg: rgba(255, 255, 255, 0.5);
    --input-border: #ddd;
}

body {
    font-family: var(--font-family);
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color-start), var(--primary-color-end));
    color: var(--text-color);
    padding: 1rem;
    box-sizing: border-box;
}

/* --- Auth Container --- */
.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
    text-align: center;
    transition: transform 0.3s ease;
}

.auth-container:hover {
    transform: translateY(-5px);
}

.auth-container h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 1.5rem;
    text-align: right;
    position: relative;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .icon {
    position: absolute;
    top: 50%;
    right: 15px; /* آیکون در سمت راست برای فرم راست‌چین */
    transform: translateY(-50%);
    color: var(--light-text-color);
    transition: color 0.3s ease;
    pointer-events: none; /* اجازه کلیک روی اینپوت را می‌دهد */
}

.form-group input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem; /* فضای خالی برای آیکون در سمت راست */
    border: 1px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-family);
    box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: var(--light-text-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color-start);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.form-group input:focus + .icon {
    color: var(--primary-color-start);
}

/* --- Button --- */
button {
    width: 100%;
    padding: 1rem;
    border: none;
    background: linear-gradient(135deg, var(--primary-color-start), var(--primary-color-end));
    color: white;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: var(--font-family);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* --- Links --- */
.switch-link, .extra-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.switch-link a, .extra-links a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.switch-link a:hover, .extra-links a:hover {
    text-decoration: underline;
    color: #fff;
    text-shadow: 0 0 5px rgba(255,255,255,0.7);
}

/* --- Messages --- */
.message, .error {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid;
    text-align: center;
}

.message {
    color: var(--success-color);
    background-color: rgba(26, 115, 232, 0.1);
    border-color: rgba(26, 115, 232, 0.2);
}

.error {
    color: var(--error-color);
    background-color: rgba(217, 48, 37, 0.1);
    border-color: rgba(217, 48, 37, 0.2);
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 480px) {
    body {
        align-items: flex-start; /* فرم به بالای صفحه بچسبد */
        padding-top: 5vh;
    }

    .auth-container {
        padding: 2rem 1.5rem;
        width: 100%;
        max-width: none;
        box-shadow: none;
        border: none;
        background: transparent;
        backdrop-filter: none;
    }

    .auth-container h1 {
        font-size: 1.8rem;
    }
}
