/* Modern Dark Theme - Player Development App */
:root {
    --primary: #ff6b00;
    --primary-hover: #ff8533;
    --gradient: linear-gradient(135deg, #ff6b00 0%, #ee2a7b 60%, #9333ea 100%);
    --ai-gradient: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    --accent-blue: #0ea5e9;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --bg-dark: #0b1120;
    --bg-card: #1e293b;
    --bg-card-hover: #26334d;
    --border: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --glass: rgba(30, 41, 59, 0.7);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Nav */
header {
    background: rgba(11, 17, 32, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 24px;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
}

.logo-badge {
    background: var(--gradient);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Main Layout */
main {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
}

/* Athlete Profile Bar */
.athlete-bar {
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: var(--shadow);
}

.athlete-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.athlete-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
}

.athlete-details h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.athlete-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.meta-chip {
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.08);
}

.athlete-selector-dropdown {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-main);
}

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

/* Content Views */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* Stat Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    border-color: rgba(255, 107, 0, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1;
}

.stat-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trend-up { color: var(--accent-green); }
.trend-down { color: var(--accent-red); }

/* Interactive Court Canvas / SVG */
.court-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 50 / 32;
    background: #111827;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    overflow: hidden;
    touch-action: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.court-svg {
    width: 100%;
    height: 100%;
}

.shot-marker {
    cursor: pointer;
    transition: transform 0.15s ease;
}
.shot-marker:hover {
    transform: scale(1.4);
}

/* Court Zones Styling */
.court-zone-overlay {
    fill: transparent;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 1;
    transition: fill 0.2s ease;
    cursor: pointer;
}
.court-zone-overlay:hover {
    fill: rgba(255, 107, 0, 0.15);
}

/* Controls & Buttons */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.btn-ai {
    background: var(--ai-gradient);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}
.btn-ai:hover {
    filter: brightness(1.1);
}

/* Shot Controls Panel */
.shot-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pill-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-option {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pill-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Heatmap & Skill Breakdown Lists */
.skill-bar-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-label-bar {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-track {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* AI Recommendations Card */
.ai-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    position: relative;
    overflow: hidden;
}

.ai-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--ai-gradient);
}

.ai-bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.ai-bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}

.ai-bullet-list li::before {
    content: '⚡';
    font-size: 1rem;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop.show {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 540px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main { padding: 16px; }
    .athlete-bar { flex-direction: column; align-items: flex-start; }
    .stat-value { font-size: 1.8rem; }
}
