/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tahoma', 'Arial', sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* هدر */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* دکمه‌ها */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 5px;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--accent-color);
}

.btn-success {
    background-color: var(--success-color);
}

/* فرم‌ها */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* کارت‌ها */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

/* پنل‌ها */
.panel-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.panel-btn {
    display: block;
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.panel-btn:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.public-btn {
    border-color: var(--success-color);
}

.admin-btn {
    border-color: var(--accent-color);
}

/* سوالات */
.question-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

.question-item:hover {
    border-color: var(--secondary-color);
}

.question-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.answer {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 4px solid var(--success-color);
    display: none;
}

.answer.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* ناوبری */
.nav-tabs {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
}

.nav-tab.active {
    background: var(--secondary-color);
    color: white;
}

.nav-tab:hover:not(.active) {
    background: #f8f9fa;
}

/* جدول */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

tr:hover {
    background-color: #f8f9fa;
}

/* پیام‌ها */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* فوتتر */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .panel-selector {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 5px;
    }
}

@media (max-width: 480px) {
    .btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .card {
        padding: 15px;
    }
    
    .question-title {
        font-size: 16px;
    }
}

/* افکت‌های ویژه */
.save-btn {
    background: none;
    border: none;
    color: var(--warning-color);
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.save-btn:hover {
    transform: scale(1.2);
}

.save-btn.saved {
    color: var(--success-color);
}

.contact-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.contact-info h3 {
    margin-bottom: 10px;
}

.contact-info a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

.category-badge {
    display: inline-block;
    padding: 5px 10px;
    background: var(--light-color);
    border-radius: 20px;
    font-size: 12px;
    margin-left: 10px;
}

/* انیمیشن‌ها */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}