/* ═══════════════════════════════════════════════════════════
   ماتش - التصميم الرئيسي
   خلفية بيضاء + أخضر وأسود
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

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

:root {
    --green: #4CAF50;
    --green-dark: #388E3C;
    --green-light: #81C784;
    --black: #1a1a1a;
    --gray-dark: #333;
    --gray: #666;
    --gray-light: #999;
    --gray-lighter: #e0e0e0;
    --white: #ffffff;
    --bg: #f8f9fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    --radius: 12px;
}

/* فرض الأرقام الإنجليزية */
body, input, textarea, select, button, * {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* فرض الأرقام اللاتينية في كل العناصر */
html {
    font-family: 'Tajawal', sans-serif;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--black);
    line-height: 1.6;
    direction: rtl;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

/* ═══════════════════════════════════════════════════════════
   الهيدر
═══════════════════════════════════════════════════════════ */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.logo img { height: 60px; }

.nav { display: flex; gap: 30px; }
.nav a {
    color: var(--gray-dark);
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
.nav a:hover, .nav a.active {
    color: var(--green);
    border-bottom-color: var(--green);
}

.header-btns { display: flex; gap: 10px; }

/* ═══════════════════════════════════════════════════════════
   الأزرار
═══════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--green);
    color: white;
}
.btn-primary:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-dark);
    border: 2px solid var(--gray-lighter);
}
.btn-secondary:hover {
    border-color: var(--green);
    color: var(--green);
}

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

.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 32px; font-size: 17px; }
.btn-block { width: 100%; }

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

.page { padding: 40px 0; }
.page-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--black);
}
.page-subtitle {
    color: var(--gray);
    margin-bottom: 30px;
}

/* ═══════════════════════════════════════════════════════════
   البطاقات
═══════════════════════════════════════════════════════════ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
}

.card-body { padding: 20px; }

/* ═══════════════════════════════════════════════════════════
   بطاقة المباراة - تصميم احترافي
═══════════════════════════════════════════════════════════ */
.match-card-pro {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    border: 1px solid #eee;
}
.match-card-pro:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(76,175,80,0.2);
    border-color: var(--green);
}
.match-card-pro:active {
    transform: scale(0.98);
}

.match-card-pro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-bottom: 1px solid #eee;
}
.match-card-pro-date {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}
.match-card-pro-date i {
    color: var(--green);
    margin-left: 6px;
}
.match-card-pro-status {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
}
.match-card-pro-status.available {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}
.match-card-pro-status.full {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
}
.match-card-pro-status.booked {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
}
.match-card-pro-status i {
    margin-left: 4px;
}

/* بطاقة محجوزة */
.match-card-pro.match-booked {
    border: 2px solid #1976D2;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.2);
    position: relative;
    overflow: visible;
}
.match-card-pro.match-booked:hover {
    box-shadow: 0 8px 30px rgba(25, 118, 210, 0.3);
    border-color: #1565c0;
}

/* شريط "أنت مشترك" */
.booked-ribbon {
    position: absolute;
    top: -10px;
    right: 15px;
    background: linear-gradient(135deg, #1976D2, #1565c0);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(25, 118, 210, 0.4);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: ribbonPulse 2s infinite;
}
.booked-ribbon i {
    font-size: 14px;
}
@keyframes ribbonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* بطاقة مكتملة العدد */
.match-card-pro.match-full {
    position: relative;
    overflow: hidden;
    border: 2px solid #ff9800;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
}
.match-card-pro.match-full:hover {
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.25);
    border-color: #f57c00;
}
.progress-bar-pro.full {
    background: #ffe0b2;
}
.progress-fill-pro.full {
    background: linear-gradient(135deg, #ff9800, #f57c00) !important;
}
.progress-text-pro.full {
    color: #e65100;
    font-weight: 700;
    font-size: 12px;
}

/* تأثير نبض لزر الانتظار */
.match-card-pro.match-full .match-card-pro-action span {
    animation: waitlistPulse 2s ease-in-out infinite;
}
@keyframes waitlistPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* تأثير اهتزاز الجرس */
.match-card-pro-status.full i {
    animation: bellShake 3s ease-in-out infinite;
}
@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    5% { transform: rotate(15deg); }
    10% { transform: rotate(-15deg); }
    15% { transform: rotate(10deg); }
    20% { transform: rotate(-10deg); }
    25% { transform: rotate(0deg); }
}

/* ═══════════════════════════════════════════════════════════
   حالة الانتظار - اللاعب في قائمة الانتظار
═══════════════════════════════════════════════════════════ */
.match-card-pro.match-waiting {
    position: relative;
    overflow: hidden;
    border: 2px solid #9c27b0;
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
}
.match-card-pro.match-waiting:hover {
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.25);
    border-color: #7b1fa2;
}
.match-card-pro-status.waiting {
    background: linear-gradient(135deg, #e1bee7, #ce93d8);
    color: #7b1fa2;
}
.match-card-pro-status.waiting i {
    animation: hourglassRotate 2s ease-in-out infinite;
}
@keyframes hourglassRotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

/* شريط الانتظار */
.waiting-ribbon {
    position: absolute;
    top: 12px;
    right: -35px;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    padding: 5px 40px;
    font-size: 11px;
    font-weight: 700;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(156, 39, 176, 0.4);
}
.waiting-ribbon i {
    margin-left: 4px;
}

/* progress bar للانتظار */
.progress-bar-pro.waiting {
    background: #e1bee7;
}
.progress-fill-pro.waiting {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2) !important;
}
.progress-text-pro.waiting {
    color: #7b1fa2;
    font-weight: 700;
}

/* تنبيه الفئة العمرية */
.match-age-notice {
    text-align: center;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0;
}

.match-age-notice.age-10-12 {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}

.match-age-notice.age-13-15 {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
}

.match-age-notice.age-16-17 {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
}

.match-age-notice.age-18-plus {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
}

/* المباراة المجانية */
.match-card-pro-footer.free-match {
    background: linear-gradient(135deg, #00c853, #00e676) !important;
    position: relative;
    overflow: hidden;
}

.match-card-pro-footer.free-match::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: freeShine 2s infinite;
}

@keyframes freeShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.match-card-pro-footer.free-match .match-card-pro-action {
    color: white;
}

.match-card-pro-footer.free-match .match-card-pro-action i {
    color: white;
}

.free-badge-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.free-badge-container .free-icon {
    font-size: 22px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.free-badge-container .free-text {
    font-size: 16px;
    font-weight: 800;
    color: #00c853;
    letter-spacing: 1px;
}

/* بانر المباراة المجانية في التفاصيل */
.free-match-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, #00c853, #00e676);
    padding: 20px;
    border-radius: 16px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.3);
}

.free-match-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: freeShine 2s infinite;
}

.free-match-icon {
    font-size: 45px;
    animation: bounce 1s infinite;
}

.free-match-text {
    text-align: center;
}

.free-match-title {
    font-size: 22px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.free-match-subtitle {
    font-size: 15px;
    color: white;
    margin-top: 5px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* زر الانضمام المجاني */
.free-join-btn.free {
    background: linear-gradient(135deg, #00c853, #00e676) !important;
    color: white !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 16px 30px !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.free-join-btn.free:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 35px rgba(0, 200, 83, 0.5) !important;
}

.free-join-btn.free::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: freeShine 2s infinite;
}

.free-join-btn .free-join-icon {
    font-size: 24px;
    animation: bounce 1s infinite;
}

.match-card-pro-countdown.booked {
    background: linear-gradient(135deg, #1976D2, #1565c0);
}

/* أيقونة الملعب للمحجوز */
.stadium-icon-pro.booked {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976D2;
}

/* شريط التقدم للمحجوز */
.progress-bar-pro.booked {
    background: #bbdefb;
}
.progress-fill-pro.booked {
    background: linear-gradient(90deg, #1976D2, #42a5f5);
}

.match-card-pro-countdown {
    background: linear-gradient(135deg, #4CAF50, #2e7d32);
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}
.match-card-pro-countdown i {
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.match-card-pro-body {
    padding: 16px;
}

.match-card-pro-stadium {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #eee;
}
.stadium-icon-pro {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 22px;
}
.stadium-info-pro h4 {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}
.stadium-info-pro p {
    font-size: 13px;
    color: #888;
}
.stadium-info-pro p i {
    margin-left: 4px;
    color: #aaa;
}

.match-card-pro-details {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}
.detail-item-pro {
    text-align: center;
    flex: 1;
}
.detail-item-pro i {
    font-size: 18px;
    color: var(--green);
    margin-bottom: 6px;
    display: block;
}
.detail-item-pro .detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    display: block;
}
.detail-item-pro .detail-label {
    font-size: 11px;
    color: #999;
}

.match-card-pro-progress {
    margin-bottom: 12px;
}
.progress-bar-pro {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-fill-pro {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.5s ease;
}
.progress-text-pro {
    font-size: 12px;
    color: #666;
}

.match-card-pro-organizer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    padding: 10px 12px;
    background: #f0f9f0;
    border-radius: 8px;
}
.match-card-pro-organizer i {
    color: var(--green);
}

.match-card-pro-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}
.match-card-pro-footer.booked {
    background: linear-gradient(135deg, #1976D2, #1565c0);
}
.match-card-pro-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.match-card-pro-price .price-amount {
    font-size: 26px;
    font-weight: 800;
}
.match-card-pro-price .price-currency {
    font-size: 14px;
    opacity: 0.9;
}
.match-card-pro-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
    transition: all 0.3s;
}
.match-card-pro:hover .match-card-pro-action {
    opacity: 1;
    gap: 12px;
}

/* تفاصيل المباراة - Modal */
.match-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.match-details-date {
    font-size: 14px;
    color: var(--gray-dark);
}
.match-details-date i { margin-left: 5px; color: var(--green); }
.match-status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.match-status-badge.available { background: #e8f5e9; color: #2e7d32; }
.match-status-badge.full { background: #ffebee; color: #c62828; }
.match-status-badge.booked { background: #e3f2fd; color: #1565c0; }

.match-booked-banner {
    background: linear-gradient(135deg, #1976D2, #1565c0);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.match-booked-banner i {
    font-size: 20px;
}

.match-details-remaining {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 20px;
}
.match-details-remaining.booked {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
}
.match-details-remaining i { margin-left: 8px; }

.match-details-price.booked {
    background: linear-gradient(135deg, #1976D2, #1565c0);
}

.match-details-stadium {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.match-details-stadium .stadium-icon {
    width: 60px;
    height: 60px;
    background: var(--bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 28px;
}
.match-details-stadium h3 { font-size: 20px; margin-bottom: 5px; }
.match-details-stadium p { color: var(--gray); font-size: 14px; }
.match-details-stadium p i { margin-left: 5px; }

.match-details-organizer {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f9f0;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}
.match-details-organizer i { color: var(--green); font-size: 20px; }
.match-details-organizer span { font-size: 12px; color: var(--gray); display: block; }
.match-details-organizer strong { font-size: 15px; }

.match-details-location {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e3f2fd;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #1976D2;
    text-decoration: none;
    font-weight: 600;
}
.match-details-location i:last-child { margin-right: auto; font-size: 12px; }

.match-details-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.match-details-info .info-item {
    text-align: center;
    padding: 15px 10px;
    background: var(--bg);
    border-radius: 10px;
}
.match-details-info .info-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--black);
}
.match-details-info .info-value small { font-size: 12px; }
.match-details-info .info-label {
    font-size: 12px;
    color: var(--gray);
    margin-top: 5px;
}

.match-details-slots {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.match-details-slots .slots-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-lighter);
    border-radius: 4px;
    overflow: hidden;
}
.match-details-slots .slots-fill {
    height: 100%;
    background: var(--green);
    border-radius: 4px;
}

.match-details-price {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}
.match-details-price .price-value {
    font-size: 32px;
    font-weight: 800;
}
.match-details-price .price-value small { font-size: 16px; }
.match-details-price .price-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 480px) {
    .match-card-pro-details {
        padding: 10px 8px;
    }
    .detail-item-pro .detail-value {
        font-size: 14px;
    }
    .match-card-pro-price .price-amount {
        font-size: 22px;
    }
}

/* ═══════════════════════════════════════════════════════════
   الفورم
═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-dark);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s;
    background: var(--white);
}
.form-control:focus {
    outline: none;
    border-color: var(--green);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 40px;
}

/* OTP */
.otp-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
}
.otp-input {
    width: 55px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius);
}
.otp-input:focus {
    outline: none;
    border-color: var(--green);
}

/* ═══════════════════════════════════════════════════════════
   صفحة تسجيل الدخول
═══════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--white) 100%);
}

.auth-box {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}
.auth-logo img { height: 80px; }

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.auth-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 10px;
}
.auth-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 30px;
}

/* ═══════════════════════════════════════════════════════════
   المحفظة
═══════════════════════════════════════════════════════════ */
.wallet-card {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    border-radius: var(--radius);
    padding: 30px;
    color: white;
}
.wallet-label { opacity: 0.9; margin-bottom: 5px; }
.wallet-balance {
    font-size: 36px;
    font-weight: 800;
}
.wallet-balance span { font-size: 18px; font-weight: 400; }

/* ═══════════════════════════════════════════════════════════
   الإحصائيات
═══════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 22px;
}
.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--black);
}
.stat-label {
    color: var(--gray);
    font-size: 14px;
    margin-top: 5px;
}

/* ═══════════════════════════════════════════════════════════
   الشبكة
═══════════════════════════════════════════════════════════ */
.grid {
    display: grid;
    gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .nav { display: none; }
    .match-info { grid-template-columns: repeat(2, 1fr); }
    .logo img { height: 50px; }
    .header-content { padding: 8px 15px; min-height: 60px; }
}

/* ═══════════════════════════════════════════════════════════
   الجدول
═══════════════════════════════════════════════════════════ */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid var(--gray-lighter);
}
.table th {
    background: var(--bg);
    font-weight: 600;
}
.table tr:hover { background: var(--bg); }

/* ═══════════════════════════════════════════════════════════
   التنبيهات
═══════════════════════════════════════════════════════════ */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-info { background: #e3f2fd; color: #1565c0; }

/* ═══════════════════════════════════════════════════════════
   النافذة المنبثقة
═══════════════════════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    z-index: 1000;
}
.modal.active { display: flex; }

.modal-content {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-lighter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}
.modal-body { 
    padding: 20px; 
    overflow-y: auto;
    flex: 1;
    padding-bottom: 100px;
}
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-lighter);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* أزرار تفاصيل المباراة - ثابتة في الأسفل */
.match-details-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px 20px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 10001;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
}

/* إخفاء bottom-nav عند فتح المودال */
.modal.active ~ .bottom-nav,
body.modal-open .bottom-nav {
    display: none !important;
}

@media (min-width: 600px) {
    .modal {
        align-items: center;
        padding: 20px;
    }
    .modal-content {
        border-radius: var(--radius);
        max-height: 90vh;
    }
    .match-details-actions {
        position: sticky;
        bottom: 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        border-radius: 0;
        padding-bottom: 15px;
    }
}

/* ═══════════════════════════════════════════════════════════
   حالة فارغة
═══════════════════════════════════════════════════════════ */
.empty {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon {
    font-size: 60px;
    color: var(--gray-lighter);
    margin-bottom: 20px;
}
.empty h3 { color: var(--gray); margin-bottom: 10px; }
.empty p { color: var(--gray-light); }

/* ═══════════════════════════════════════════════════════════
   التحميل
═══════════════════════════════════════════════════════════ */
.loading {
    text-align: center;
    padding: 40px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-lighter);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   الفوتر
═══════════════════════════════════════════════════════════ */
.footer {
    background: var(--white);
    border-top: 1px solid var(--gray-lighter);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    color: var(--gray);
}

/* ═══════════════════════════════════════════════════════════
   التنقل السفلي (موبايل)
═══════════════════════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 9999;
    /* إصلاح مشكلة السكرول على الجوال */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    /* دعم iPhone notch */
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-items {
    display: flex;
}
.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    color: var(--gray);
    font-size: 12px;
    text-decoration: none;
}
.bottom-nav-item i { font-size: 20px; display: block; margin-bottom: 3px; }
.bottom-nav-item.active { color: var(--green); }

@media (max-width: 768px) {
    .bottom-nav { display: block; }
    body { 
        padding-bottom: 70px; 
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
    }
    /* منع تأثير السكرول على النافيجيشن */
    html, body {
        overflow-x: hidden;
    }
}

/* ═══════════════════════════════════════════════════════════
   Utilities
═══════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-green { color: var(--green); }
.text-gray { color: var(--gray); }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none !important; }

/* Success Animation */
@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

