/*
Theme Name: AzarShoot
Theme URI: https://azarshoot.local
Author: AzarShoot Team
Author URI: https://azarshoot.local
Description: Premium Sports Dashboard for Live Match Viewing, Schedules, News, and Community Chat.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: azarshoot
Tags: dark-mode, sports, football, live-streaming, custom-post-types
*/

/* ============================================
   CSS VARIABLES - DESIGN SYSTEM
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --background: #F5F7F5;
    --foreground: #0B0F0B;
    --card: #FFFFFF;
    --card-foreground: #0B0F0B;
    --primary: #A3E635;
    --primary-foreground: #000000;
    --muted: #E8EBE8;
    --muted-foreground: #6B7280;
    --accent: #A3E635;
    --accent-foreground: #000000;
    --border: #E5E7EB;
    --input: #E5E7EB;
    --ring: #A3E635;
    --radius: 1.5rem;
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

html.dark {
    --background: #0B0F0B;
    --foreground: #FFFFFF;
    --card: #151915;
    --card-foreground: #FFFFFF;
    --primary: #A3E635;
    --primary-foreground: #000000;
    --muted: #1C211C;
    --muted-foreground: #8B8B8B;
    --accent: #A3E635;
    --accent-foreground: #000000;
    --border: #242924;
    --input: #242924;
    --ring: #A3E635;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }
::selection { background: var(--primary); color: #000; }

/* ============================================
   LAYOUT
   ============================================ */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    padding-bottom: 70px;
    padding-top: 64px;
}

.site-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.site-main {
    flex: 1;
    width: 100%;
    overflow-x: hidden;
    padding: 1rem;
}

/* Remove padding exclusively on Single Match page (Mobile Only) */
body.single-match .site-main {
    padding: 0;
}

.site-main-inner {
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .site-wrapper { padding-bottom: 0; }
    .site-main { margin-left: 64px; padding: 2rem; }
    body.single-match .site-main { padding: 2rem; } /* Restore desktop padding */
    .site-main-inner { gap: 2rem; }
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    height: 64px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--background);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    transition: background-color 0.3s;
}

/* Fix for WordPress Admin Bar Overlap */
body.admin-bar .site-header {
    margin-top: 32px;
}
body.admin-bar .site-sidebar {
    margin-top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        margin-top: 46px;
    }
    body.admin-bar .site-sidebar {
        margin-top: 46px;
    }
}

.header-logo-container {
    display: flex;
    align-items: center;
}

.header-logo-custom img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-logo-icon {
    width: 32px; height: 32px;
    background: rgba(var(--foreground-rgb, 0,0,0), 0.1);
    background: color-mix(in srgb, var(--foreground) 10%, transparent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-dot {
    width: 20px; height: 20px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo-dot-inner {
    width: 10px; height: 10px;
    background: #000;
    border-radius: 50%;
}

.header-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.header-logo-text .brand {
    font-weight: 900;
    font-size: 12px;
    letter-spacing: -0.05em;
}

.header-logo-text .sub {
    font-size: 8px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Desktop Search */
.header-search-desktop {
    display: none;
    flex: 1;
    max-width: 28rem;
    margin: 0 1rem;
    position: relative;
    max-height: 40px;
}

.header-search-desktop .search-form {
    width: 100%;
    position: relative;
}

.header-search-desktop .search-form svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--muted-foreground);
    pointer-events: none;
    z-index: 5;
}

.header-search-desktop input {
    width: 100%;
    background: color-mix(in srgb, var(--foreground) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
    border-radius: 9999px;
    padding: 10px 1rem 10px 45px;
    font-size: 13px;
    color: var(--foreground);
    outline: none;
    transition: all 0.3s;
    position: relative;
    display: block;
}

.header-search-desktop input:focus {
    border-color: color-mix(in srgb, var(--primary) 50%, transparent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

.header-search-desktop input::placeholder {
    color: var(--muted-foreground);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.header-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--foreground) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 0 10px rgba(163,230,53,0.1);
    transition: transform 0.2s, background 0.3s;
    position: relative;
}

.header-btn:active { transform: scale(0.95); }
.header-btn.active { background: var(--primary); color: #000; }

.header-btn .badge {
    position: absolute;
    top: 0; right: 0;
    width: 8px; height: 8px;
    background: #dc2626;
    border-radius: 50%;
    border: 2px solid var(--background);
}

.search-toggle-btn {
    display: none !important;
}

@media (max-width: 767px) {
    .search-toggle-btn.mobile-search-toggle {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    .site-header { padding: 0 2rem; }
    .header-search-desktop { display: flex; }
}

/* Mobile Search Overlay */
.mobile-search-bar {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    z-index: 40;
    padding: 1rem;
    background: color-mix(in srgb, var(--background) 80%, transparent);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    animation: slideDown 0.3s ease;
}

body.admin-bar .mobile-search-bar {
    top: 96px; /* 64 + 32 */
}
@media screen and (max-width: 782px) {
    body.admin-bar .mobile-search-bar {
        top: 110px; /* 64 + 46 */
    }
}

.mobile-search-bar.active { display: block; }

.mobile-search-bar input {
    width: 100%;
    background: color-mix(in srgb, var(--foreground) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    font-size: 14px;
    color: var(--foreground);
    outline: none;
}
.mobile-search-bar .search-form {
    position: relative;
    width: 100%;
}

.mobile-search-bar .search-form svg {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--muted-foreground);
    z-index: 5;
}

/* Notifications Popup */
.notifications-popup {
    display: none;
    position: absolute;
    top: 48px; right: 0;
    width: 256px;
    background: #1E1F22;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    z-index: 50;
    animation: zoomIn 0.3s ease;
}

.notifications-popup.active { display: block; }

.notif-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
    cursor: pointer;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-item.new { background: color-mix(in srgb, var(--primary) 5%, transparent); }

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

.notif-item .notif-title {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    transition: color 0.2s;
}

.notif-item:hover .notif-title { color: var(--primary); }

.notif-item .notif-time {
    font-size: 9px;
    color: var(--muted-foreground);
}

.notif-item .notif-message {
    font-size: 10px;
    color: var(--muted-foreground);
    line-height: 1.4;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   SIDEBAR (Desktop)
   ============================================ */
.site-sidebar {
    display: none;
    width: 64px;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    border-right: 1px solid color-mix(in srgb, var(--foreground) 5%, transparent);
    background: var(--background);
    height: calc(100vh - 64px);
    position: fixed;
    top: 64px; left: 0;
    z-index: 40;
    transition: background-color 0.3s;
}

@media (min-width: 768px) {
    .site-sidebar { display: flex; }
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    transition: all 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: var(--muted-foreground);
    position: relative;
    padding: 0;
}

.sidebar-nav-btn:hover {
    color: var(--foreground);
    background: color-mix(in srgb, var(--foreground) 5%, transparent);
}

.sidebar-nav-btn.active {
    background: var(--primary);
    color: #000;
    box-shadow: 0 5px 15px rgba(163,230,53,0.3);
    transform: none;
}

.sidebar-nav-btn svg {
    width: 20px; height: 20px;
    transition: transform 0.3s;
}

.sidebar-nav-btn:hover svg { transform: scale(1.1); }

.sidebar-nav-btn .nav-label {
    display: none;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0em;
    line-height: 1;
}

.sidebar-nav-btn.active .nav-label { display: block; }

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
    align-items: center;
}

.sidebar-bottom .help-btn {
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--muted-foreground);
    transition: all 0.3s;
}

.sidebar-bottom .help-btn:hover {
    color: var(--foreground);
    background: color-mix(in srgb, var(--foreground) 5%, transparent);
}

.sidebar-avatar-wrap {
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, var(--foreground) 5%, transparent);
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.sidebar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--foreground) 20%, transparent);
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-avatar:hover { transform: scale(1.05); }
.sidebar-avatar.active {
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Profile Menu */
.profile-menu {
    display: none;
    position: absolute;
    bottom: 0; left: 48px;
    width: 256px;
    background: #1E1F22;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    z-index: 50;
    animation: zoomIn 0.3s ease;
}

.profile-menu.active { display: block; }

.profile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-menu-header img {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--primary) 50%, transparent);
    object-fit: cover;
}

.profile-menu-header .profile-name {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
}

.profile-menu-header .profile-handle {
    font-size: 10px;
    color: var(--muted-foreground);
    font-weight: 500;
}

.profile-menu-items {
    padding: 0.5rem;
}

.profile-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem;
    border-radius: 0.75rem;
    transition: background 0.2s;
    color: var(--muted-foreground);
}

.profile-menu-item:hover { background: rgba(255,255,255,0.05); }
.profile-menu-item:hover .pm-label,
.profile-menu-item:hover svg { color: #fff; }

.profile-menu-item .pm-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-menu-item .pm-label {
    font-weight: 700;
    font-size: 12px;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.profile-menu-item svg {
    width: 16px; height: 16px;
    transition: color 0.2s;
}

.profile-menu-item.danger { color: #f87171; }
.profile-menu-item.danger:hover { background: rgba(239,68,68,0.1); }
.profile-menu-item.danger .pm-label { color: #f87171; }
.profile-menu-item.danger:hover .pm-label { color: #ef4444; }

/* Theme Toggle Switch */
.theme-switch {
    width: 32px; height: 16px;
    border-radius: 9999px;
    position: relative;
    transition: background 0.3s;
    background: #4E5058;
}

html.dark .theme-switch { background: var(--primary); }

.theme-switch .switch-dot {
    position: absolute;
    top: 2px; left: 2px;
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
}

html.dark .theme-switch .switch-dot { left: 18px; }

/* ============================================
   BOTTOM NAV (Mobile)
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 70px;
    background: color-mix(in srgb, var(--background) 80%, transparent);
    backdrop-filter: blur(20px);
    border-top: 1px solid color-mix(in srgb, var(--foreground) 5%, transparent);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem;
    z-index: 50;
    transition: all 0.3s;
}

@media (min-width: 768px) {
    .bottom-nav { display: none; }
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    height: 100%;
    transition: all 0.2s;
    position: relative;
    color: var(--muted-foreground);
}

.bottom-nav-btn.active { color: var(--primary); }

.bottom-nav-btn .bnav-icon {
    position: relative;
}

.bottom-nav-btn svg {
    width: 26px; height: 26px;
    transition: transform 0.2s;
}

.bottom-nav-btn.active svg {
    transform: scale(1.1);
    stroke-width: 2.5;
}

.bottom-nav-btn .bnav-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    background: #dc2626;
    border-radius: 50%;
    border: 2px solid var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 900;
    color: #fff;
}

.bottom-nav-btn .bnav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -0.02em;
    transition: all 0.2s;
    opacity: 0.7;
}

.bottom-nav-btn.active .bnav-label {
    font-weight: 700;
    opacity: 1;
}

.bottom-nav-btn .bnav-indicator {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 32px; height: 4px;
    background: var(--primary);
    border-radius: 0 0 9999px 9999px;
    animation: fadeSlideDown 0.3s ease;
}
