/* ========================================
   الأنماط المشتركة للموقع
   ======================================== */

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --bg-color: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --card-bg: #1a1a2e;
    --text-color: #ffffff;
    --text-muted: #888888;
    --green: #00b894;
    --red: #e74c3c;
    --gold: #f1c40f;
    --border-color: rgba(108, 92, 231, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding-top: 60px; /* مساحة للهيدر الثابت */
    padding-bottom: 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== الحاويات ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

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

.main-content {
    min-height: calc(100vh - 80px);
}

/* ========== البطاقات ========== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ========== الأزرار ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #55efc4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #ff7675);
    color: white;
}

/* ========== التوست ========== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    max-width: 90%;
    font-size: 15px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

.toast.success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

.toast.warning {
    background: linear-gradient(135deg, #f39c12 0%, #fdcb6e 100%);
    border: 1px solid rgba(255,255,255,0.2);
    color: #1a1a2e;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-action {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: background 0.2s;
}

.toast-action:hover {
    background: rgba(255,255,255,0.3);
}

/* ========== حالة فارغة ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state .text {
    color: var(--text-muted);
    font-size: 16px;
}

/* ========== العناوين ========== */
.section-title {
    font-size: 20px;
    margin: 25px 0 15px;
    color: var(--primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* ========== حقول الإدخال ========== */
.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== موبايل ========== */
@media (max-width: 768px) {
    body {
        padding-top: 55px;
    }
    
    .container, .container-sm, .container-md {
        padding: 15px;
    }
}
