/* تنسيقات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

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

/* شريط التنقل */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* قسم البطل */
.hero {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 0.8s 0.2s both;
}

/* شبكة الاستبيانات */
.surveys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.survey-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    animation: fadeIn 0.5s;
}

.survey-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.survey-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 22px;
}

.survey-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.survey-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #999;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* نموذج تسجيل الدخول */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: fadeInUp 0.5s;
}

.auth-container h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

/* لوحة التحكم */
.dashboard {
    padding: 40px 0;
}

.dashboard-header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    color: #667eea;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
    font-size: 16px;
}

/* جدول البيانات */
.data-table {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

table th {
    background: #f8f9fa;
    color: #667eea;
    font-weight: 600;
}

table tr:hover {
    background: #f8f9fa;
}

/* الرسوم المتحركة */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* تصميم متجاوب */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .surveys-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 20px;
    }
}

/* صفحة الإحصائيات */
.statistics-page {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.chart-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* نموذج الأسئلة */
.question-builder {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.question-item {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-right: 4px solid #667eea;
}

.option-list {
    margin-top: 10px;
    padding-right: 20px;
}

.option-item {
    padding: 8px;
    margin: 5px 0;
    background: white;
    border-radius: 5px;
}
