/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
}

/* حالت تاریک */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
        color: #f0f0f0;
    }
}

/* کانتینر اصلی */
.container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* عنوان */
.title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-bottom: 15px;
}

.title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
    .title {
        color: #f0f0f0;
    }
}

/* فرم */
.form {
    background-color: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.form:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

@media (prefers-color-scheme: dark) {
    .form {
        background-color: #2d3436;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
}

/* فیلدهای ورودی */
.form input[type="text"],
.form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: #333;
}

.form input[type="text"]:focus,
.form input[type="password"]:focus {
    border-color: #3498db;
    background-color: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

@media (prefers-color-scheme: dark) {
    .form input[type="text"],
    .form input[type="password"] {
        background-color: #3c4245;
        border-color: #4a4e52;
        color: #f0f0f0;
    }
    
    .form input[type="text"]:focus,
    .form input[type="password"]:focus {
        border-color: #3498db;
        background-color: #2d3436;
    }
}

/* دکمه ورود */
.form input[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    margin-top: 10px;
}

.form input[type="submit"]:hover {
    background: linear-gradient(90deg, #2980b9, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.form input[type="submit"]:active {
    transform: translateY(1px);
}

/* پیام خطا */
.eror {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    background-color: #ffeaea;
    color: #d63031;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(214, 48, 49, 0.1);
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (prefers-color-scheme: dark) {
    .eror {
        background-color: rgba(214, 48, 49, 0.2);
        color: #ff7675;
    }
}

/* پشتیبانی از موبایل */
@media (max-width: 500px) {
    .container {
        padding: 10px;
    }
    
    .form {
        padding: 25px 20px;
    }
    
    .title {
        font-size: 1.8rem;
    }
}

/* انیمیشن ورود */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form, .title, .eror {
    animation: fadeIn 0.6s ease-out;
}

/* استایل مکان‌نما (Placeholder) */
::placeholder {
    color: #95a5a6;
    opacity: 1;
}

@media (prefers-color-scheme: dark) {
    ::placeholder {
        color: #b2bec3;
    }
}