/* style.css */
:root {
    /* BourraTV Modern Theme (Dark Blue & Neon Green) */
    --primary-color: #0f172a; /* Slate 900 */
    --secondary-color: #1e293b; /* Slate 800 */
    --accent-color: #22c55e; /* Neon Green */
    --dark-bg: #020617; /* Slate 950 */
    --text-light: #f8fafc;
    --text-dark: #334155;
    --text-muted: #64748b;
    --bg-page: #f1f5f9; /* Slate 100 */
    --card-bg: #ffffff;
    --border-color: #e2e8f0; /* Slate 200 */
    --font-family: 'Tajawal', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.main-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 5px 0; /* Very thin header */
    position: relative;
    z-index: 10;
}

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

/* Logo on the right in RTL */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

/* Actions on the left in RTL */
.header-actions {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.2);
}

.free-badge {
    background-color: #3b82f6; /* Blue */
    color: #fff;
    border: none;
}

.live-badge {
    background-color: #ef4444; /* Red */
    color: #fff;
    border: none;
}

/* Hero Section */
.hero {
    background: url('hero-bg.png') center/cover no-repeat;
    color: var(--text-light);
    text-align: center;
    padding: 50px 20px 80px; /* More bottom padding */
    position: relative;
    overflow: hidden;
}

/* Dark overlay for readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.7); /* Dark blue overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255,255,255,0.2);
    padding: 5px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
}

.dot-pulse {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.4;
}

/* Matches Section */
.matches-section {
    padding: 0 20px 40px;
    margin-top: -30px; /* Pull up over hero */
    position: relative;
    z-index: 3;
}

.matches-header {
    background-color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between; /* title right, refresh left */
    align-items: center;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.matches-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.matches-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-color); /* Red text like YacineTV */
    margin: 0;
}

.refresh-btn {
    background: transparent;
    border: none;
    color: #4a90e2; /* Light blue like YacineTV */
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Match Card */
.match-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.match-card:hover {
    transform: translateY(-2px);
    border-color: #ffcccc;
}

.match-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fbf8f8;
    font-size: 0.8rem;
    font-weight: 700;
}

.match-status {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 5px;
}
.match-status.finished { color: var(--text-muted); }

.match-competition {
    color: var(--text-muted);
}

.match-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 15px;
    direction: ltr;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35%;
    text-align: center;
}

.team-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-bottom: 10px;
}

.team-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #222;
}

.match-info {
    width: 30%;
    text-align: center;
}

.match-score-time {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color); /* Red score */
    margin-bottom: 2px;
}

.match-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.match-footer {
    padding: 0 10px 10px;
}

.watch-btn {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

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

.watch-btn.disabled {
    background-color: transparent;
    color: transparent;
    padding: 0;
}

/* Footer */
.main-footer {
    background-color: var(--dark-bg); /* Dark purple */
    color: var(--text-light);
    text-align: center;
    padding: 30px 20px 20px;
    margin-top: 40px;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.footer-desc {
    max-width: 600px;
    margin: 0 auto 15px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-bottom {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* Single Match Page Specific Styles */
.single-match-page {
    background-color: var(--bg-page);
}

.single-match-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 20px;
}

.single-match-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.single-match-body {
    padding: 40px 20px;
}

.large-logo {
    width: 65px;
    height: 65px;
}

.single-match-actions {
    padding: 0 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.watch-now-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.watch-now-btn:hover {
    background-color: var(--secondary-color);
}

.return-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    color: var(--text-muted);
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.return-btn:hover {
    background-color: #f9f9f9;
}

.simple-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .matches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 30px 15px 60px;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .single-match-container-wrapper {
        min-height: auto;
    }
}
