@font-face {
    font-family: 'Vazirmatn';
    src: url('font/Vazirmatn.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
    min-height: 100vh;
    padding: 40px 20px;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================== کارت اصلی فرم ==================== */
.form-card, .admin-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    backdrop-filter: blur(2px);
    transition: transform 0.3s ease;
}

.form-card:hover {
    transform: translateY(-5px);
}

/* ==================== هدر جداگانه با حاشیه گرد و سایه ==================== */
.header-wrapper {
    padding: 20px 20px 0 20px;
    background: transparent;
}

.header-image-container {
    width: 100%;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background: #f8fafc;
}

.header-image-container:hover {
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
    transform: scale(1.01);
}

.header-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: all 0.3s ease;
}

/* ==================== محتوای فرم ==================== */
.form-content {
    padding: 40px 48px;
}

h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.4;
}

.subtitle {
    text-align: center;
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 18px;
}

.event-desc {
    background: #f8fafc;
    padding: 20px;
    border-radius: 24px;
    margin: 20px 0 30px;
    line-height: 1.8;
    color: #334155;
    border-right: 4px solid #3b82f6;
    font-size: 14px;
}

.event-desc strong, .event-desc b {
    color: #1e293b;
    font-weight: 700;
}

.event-desc p {
    margin-bottom: 12px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f172a;
}

input, select, textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    transition: all 0.2s;
    background: #fff;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 14px 28px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 18px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    margin-top: 10px;
}

button:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(37,99,235,0.3);
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 20px;
    text-align: center;
    display: none;
}

.success {
    background: #dcfce7;
    color: #166534;
    border-right: 4px solid #22c55e;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    border-right: 4px solid #ef4444;
}

small, .help-text {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

/* ==================== پنل مدیریت ==================== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-excel, .btn-save-config {
    background: #10b981;
    padding: 12px 24px;
    width: auto;
    display: inline-block;
}

.btn-save-config {
    background: #8b5cf6;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 20px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f1f5f9;
    font-weight: 700;
}

.config-panel {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 24px;
    margin-bottom: 30px;
}

.config-panel input, .config-panel textarea {
    margin-bottom: 12px;
}

textarea {
    width: 100%;
    font-family: 'Vazirmatn', sans-serif;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    resize: vertical;
}

hr {
    margin: 20px 0;
    border: none;
    border-top: 2px solid #e2e8f0;
}

/* ==================== دکمه ایتا ==================== */
.ita-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #FF6B35, #E85D04);
    color: white;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 50px;
    margin: 20px 0;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 16px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.ita-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.ita-icon {
    font-size: 24px;
}

/* ==================== ریسپانسیو ==================== */

/* تبلت و صفحه‌های متوسط */
@media (max-width: 992px) {
    body {
        padding: 30px 15px;
    }
    
    .form-content {
        padding: 30px 32px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .header-wrapper {
        padding: 15px 15px 0 15px;
    }
    
    .header-image-container {
        border-radius: 24px;
    }
}

/* موبایل و صفحه‌های کوچک */
@media (max-width: 768px) {
    body {
        padding: 20px 12px;
    }
    
    .form-content {
        padding: 24px 20px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .event-desc {
        padding: 15px;
        font-size: 12px;
        margin: 15px 0 20px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    label {
        font-size: 14px;
    }
    
    input, select, textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    button {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .header-wrapper {
        padding: 12px 12px 0 12px;
    }
    
    .header-image-container {
        border-radius: 20px;
    }
    
    th, td {
        font-size: 12px;
        padding: 8px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-header > div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ita-button {
        padding: 10px 20px;
        font-size: 14px;
        gap: 8px;
    }
    
    .ita-icon {
        font-size: 20px;
    }
    
    .thanks-card {
        padding: 30px 20px !important;
    }
    
    .thanks-message {
        font-size: 16px !important;
    }
}

/* موبایل‌های خیلی کوچک */
@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }
    
    .form-content {
        padding: 20px 16px;
    }
    
    h1 {
        font-size: 18px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    .event-desc {
        padding: 12px;
        font-size: 11px;
    }
    
    input, select, textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .header-wrapper {
        padding: 10px 10px 0 10px;
    }
    
    .header-image-container {
        border-radius: 16px;
    }
    
    .admin-card {
        padding: 20px !important;
    }
    
    table {
        font-size: 11px;
    }
    
    th, td {
        padding: 6px;
    }
    
    .ita-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* صفحه‌های خیلی بزرگ (بالای 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .form-content {
        padding: 50px 60px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 20px;
    }
    
    .event-desc {
        font-size: 16px;
        padding: 25px;
    }
    
    input, select, textarea {
        padding: 16px 20px;
        font-size: 18px;
    }
    
    button {
        padding: 16px 32px;
        font-size: 20px;
    }
}

/* انیمیشن‌ها */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}