/* ============================================================
   PakShauq - Modern Stylesheet
   ============================================================ */

:root {
    --primary-color: #4a148c;
    --secondary-color: #d32f2f;
    --accent-color: #ff9800;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #222;
    --text-muted: #777;
    --shadow-sm: 0 2px 6px rgba(0,0,0,.08);
    --shadow-md: 0 6px 16px rgba(0,0,0,.12);
}

*  { box-sizing: border-box; }

body {
    font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
    background: #f4f6fa;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

.urdu, .urdu-title {
    font-family: 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    line-height: 2;
}

/* Navbar */
.main-navbar {
    background: linear-gradient(90deg, var(--primary-color), #6a1b9a);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.main-navbar .navbar-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.2rem;
}

.main-navbar .nav-link {
    color: #fff !important;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 4px;
    transition: all .25s;
}

.main-navbar .nav-link:hover {
    background: rgba(255,255,255,.15);
    color: #ffd54f !important;
}

.main-navbar .nav-link i {
    margin-right: 4px;
    font-size: .85rem;
}

.main-navbar .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
    min-width: 280px;
}

.main-navbar .dropdown-item {
    white-space: normal;
    padding: 10px 14px;
}

.main-navbar .dropdown-item:hover {
    background: rgba(255,255,255,.1);
}

/* Hero */
.site-header { position: relative; }

.hero-banner {
    height: 320px;
    background-size: cover;
    background-position: center;
    background-color: #ff9800;
    position: relative;
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.55));
}

.hero-banner .overlay-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    z-index: 2;
    padding: 20px;
}

.hero-banner .overlay-content h2 {
    font-size: 2.4rem;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,.6);
}

/* Ticker */
.news-ticker {
    background: linear-gradient(90deg, var(--secondary-color), #b71c1c);
    color: #fff;
    padding: 10px 0;
    font-weight: 500;
}

.ticker-label {
    background: #fff;
    color: var(--secondary-color);
    padding: 5px 14px;
    border-radius: 20px;
    margin-right: 15px;
    font-weight: 600;
    white-space: nowrap;
}

/* Page content */
.page-content {
    min-height: 60vh;
    padding: 30px 0;
}

.section-title {
    position: relative;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 28px;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Tournament Banner */
.tournament-info-banner {
    background: linear-gradient(135deg, var(--primary-color), #6a1b9a);
    color: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    margin-bottom: 28px;
}

.tournament-info-banner h2 {
    font-weight: 700;
    margin-bottom: 6px;
}

.tournament-info-banner .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px;
}

.tournament-info-banner .meta span {
    background: rgba(255,255,255,.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .9rem;
}

/* Stats badges */
.stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}

.stat-pill {
    background: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill i {
    font-size: 1.4rem;
    color: var(--accent-color);
}

.stat-pill .label {
    color: var(--text-muted);
    font-size: .8rem;
}

.stat-pill .value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Date tabs */
.date-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 0;
}

.date-tab {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all .25s;
    font-weight: 500;
}

.date-tab:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.date-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.date-tab.total {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

.date-tab.total.active {
    background: #b71c1c;
}

/* DataTables */
table.dataTable {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    width: 100% !important;
}

table.dataTable thead th {
    background: linear-gradient(90deg, var(--primary-color), #6a1b9a);
    color: #fff !important;
    border-bottom: none !important;
    padding: 12px 10px !important;
    font-weight: 600;
}

table.dataTable tbody tr:nth-child(even) {
    background: #fdf2f8;
}

table.dataTable tbody tr:hover {
    background: #fff3e0 !important;
}

table.dataTable tbody td {
    padding: 10px 10px !important;
    vertical-align: middle;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 4px 10px;
}

.dt-buttons .btn {
    background: var(--primary-color);
    color: #fff;
    margin-right: 4px;
    font-size: .8rem;
}

.dt-buttons .btn:hover {
    background: var(--secondary-color);
    color: #fff;
}

/* Position badges */
.position-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
    font-size: .85rem;
}

.position-badge.gold   { background: #ffc107; color: #333; }
.position-badge.silver { background: #9e9e9e; }
.position-badge.bronze { background: #ff6f00; }

.participant-pic {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.time-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: #e3f2fd;
    padding: 3px 8px;
    border-radius: 4px;
    color: #1565c0;
}

.time-cell.total {
    background: #ffe0b2;
    color: #e65100;
    font-weight: 700;
}

.time-cell.missing {
    background: #ffebee;
    color: #c62828;
}

/* Cards */
.club-card, .event-card, .tournament-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all .3s;
    margin-bottom: 25px;
}

.club-card:hover, .event-card:hover, .tournament-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tournament-card .card-banner {
    height: 130px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.tournament-card .card-banner h4 {
    color: #fff;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,.4);
    font-size: 1.1rem;
}

/* Weather */
.weather-card {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: #fff;
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.weather-card .temp {
    font-size: 2.4rem;
    font-weight: 700;
}

.weather-card i {
    font-size: 2.8rem;
    color: #ffd54f;
}

/* Footer */
.site-footer {
    background: var(--dark-bg);
    color: #ddd;
    padding-top: 40px;
}

.site-footer h5 { color: #fff; margin-bottom: 18px; font-weight: 600; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #bbb; text-decoration: none; transition: color .25s; }
.footer-links a:hover { color: var(--accent-color); }

.social-icons a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.1);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    transition: all .25s;
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* Admin */
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 260px;
    background: var(--dark-bg);
    color: #fff;
}

.admin-sidebar .brand {
    padding: 18px;
    background: rgba(0,0,0,.25);
    text-align: center;
    font-weight: 700;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-sidebar ul li a {
    display: block;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all .2s;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background: rgba(255,255,255,.05);
    color: #fff;
    border-left-color: var(--accent-color);
}

.admin-sidebar ul li a i {
    width: 22px;
    margin-right: 8px;
}

.admin-main {
    flex: 1;
    background: #f4f6fa;
}

.admin-topbar {
    background: #fff;
    padding: 12px 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-content { padding: 25px; }

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    transition: all .25s;
}

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

.stat-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-right: 14px;
}

.stat-card.purple .icon { background: var(--primary-color); }
.stat-card.red    .icon { background: var(--secondary-color); }
.stat-card.orange .icon { background: var(--accent-color); }
.stat-card.blue   .icon { background: #1976d2; }
.stat-card.green  .icon { background: #2e7d32; }

.stat-card h3 { margin:0; font-weight:700; color: var(--text-dark); }
.stat-card p  { margin:0; color: var(--text-muted); font-size:.9rem; }

.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), #6a1b9a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: #fff;
    border-radius: 14px;
    padding: 35px 30px;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
    width: 100%;
    max-width: 420px;
}

.login-box h3 {
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 25px;
}

/* Pigeon time input grid for admin */
.pigeon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.pigeon-grid .pg-cell {
    background: #f9fafe;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.pigeon-grid .pg-cell label {
    font-size: .75rem;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.pigeon-grid .pg-cell input {
    width: 100%;
    border: 1px solid #ddd;
    padding: 5px 8px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: .85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-banner { height: 200px; }
    .hero-banner .overlay-content h2 { font-size: 1.4rem; }
    .admin-sidebar { width: 70px; }
    .admin-sidebar .brand,
    .admin-sidebar ul li a span { display: none; }
}
