/* Football Dashboard CSS */
/* This file should be enqueued in your WordPress theme/plugin */

/* Import Font Awesome if not already included */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

/* Root Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #ecf0f1;
    --dark-bg: #34495e;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Layout Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.sidebar .logo {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .logo i {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--warning-color);
}

.sidebar .logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-menu li {
    margin: 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.nav-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.nav-menu li:hover a,
.nav-menu li.active a {
    background: rgba(255,255,255,0.1);
    color: white;
    padding-left: 30px;
}

.nav-menu li i {
    font-size: 1.2rem;
    margin-right: 15px;
    width: 25px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: var(--transition);
    background-color: var(--light-bg);
}

.main-content.sidebar-collapsed {
    margin-left: 0;
}

/* Top Header */
.top-header {
    background: white;
    padding: 20px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-title h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.toggle-sidebar {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.toggle-sidebar:hover {
    background: #2980b9;
    transform: scale(1.05);
}

/* Dashboard Sections */
.dashboard-section {
    padding: 30px;
    display: none;
}

.dashboard-section.active {
    display: block;
}

/* Match Header */
.match-header {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.teams {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 30px;
}

.team {
    text-align: center;
    flex: 1;
}

.team-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.team-logo i {
    font-size: 3rem;
    color: white;
}

.team-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: var(--warning-color);
    padding: 0 20px;
}

/* Team Stats Grid */
.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.team-stats {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.team-stats:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.team-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
}

.team-header i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: var(--secondary-color);
}

.team-header h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.stat-item:hover {
    background: #d5dbdb;
    transform: scale(1.02);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Form Indicator */
.form-indicator {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
}

.form-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.form-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.form-badge {
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 35px;
    text-align: center;
}

.form-badge.win {
    background: var(--success-color);
    color: white;
}

.form-badge.draw {
    background: var(--warning-color);
    color: white;
}

.form-badge.loss {
    background: var(--danger-color);
    color: white;
}

.form-badge.no-data {
    background: var(--text-secondary);
    color: white;
}

/* Data Section */
.data-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
}

.section-title h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.section-title h3 i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.section-title span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

thead {
    background: var(--primary-color);
    color: white;
}

thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--light-bg);
}

tbody td {
    padding: 15px;
    font-size: 0.9rem;
}

/* Result Badges */
.result-badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.85rem;
    display: inline-block;
}

.result-badge.win {
    background: var(--success-color);
    color: white;
}

.result-badge.draw {
    background: var(--warning-color);
    color: white;
}

.result-badge.loss {
    background: var(--danger-color);
    color: white;
}

/* Goal Analysis */
.goal-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.goal-metric {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.goal-metric:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.metric-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.metric-content {
    flex: 1;
}

.metric-title {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.metric-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Analysis Summary */
.analysis-summary {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid var(--secondary-color);
}

.analysis-summary h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.analysis-summary p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Loading State */
.loading {
    position: relative;
    min-height: 200px;
}

.loader {
    border: 4px solid var(--light-bg);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Print Button (Optional) */
.btn-print {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-print:hover {
    background: #229954;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .teams {
        flex-direction: column;
        gap: 20px;
    }
    
    .vs {
        transform: rotate(90deg);
    }
    
    .team-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .goal-analysis {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    thead th,
    tbody td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 15px;
    }
    
    .header-title h2 {
        font-size: 1.3rem;
    }
    
    .match-header {
        padding: 20px;
    }
    
    .team-logo {
        width: 70px;
        height: 70px;
    }
    
    .team-logo i {
        font-size: 2rem;
    }
    
    .team-name {
        font-size: 1.2rem;
    }
    
    .vs {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .toggle-sidebar,
    .btn-print {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-section {
        page-break-inside: avoid;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}