/* FightingData.com Stylesheet */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Links */
a {
    color: #dc2626;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #ef4444;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #dc2626;
    color: white;
}

.btn-primary:hover {
    background-color: #b91c1c;
    color: white;
}

.btn-secondary {
    background-color: #1f2937;
    color: white;
    border: 1px solid #374151;
}

.btn-secondary:hover {
    background-color: #374151;
}

/* Layout Utilities */
.bg-black { background-color: #000000; }
.bg-gray-900 { background-color: #111827; }
.bg-gray-800 { background-color: #1f2937; }
.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-red-600 { color: #dc2626; }

.border { border: 1px solid; }
.border-gray-800 { border-color: #1f2937; }
.border-gray-700 { border-color: #374151; }
.border-red-600 { border-color: #dc2626; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Spacing */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
}

@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
}

/* Text */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

@media (min-width: 768px) {
    .md\:text-6xl { font-size: 3.75rem; }
}

/* Width */
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-16 { width: 4rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Height */
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }
.min-h-screen { min-height: 100vh; }

/* Transitions */
.transition {
    transition-property: all;
    transition-duration: 200ms;
    transition-timing-function: ease;
}

/* Hover States */
.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:bg-gray-700:hover { background-color: #374151; }
.hover\:bg-red-700:hover { background-color: #b91c1c; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-red-500:hover { color: #ef4444; }
.hover\:border-red-600:hover { border-color: #dc2626; }

/* Border */
.border-l-4 { border-left-width: 4px; }
.border-t { border-top-width: 1px; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; }
.border-b { border-bottom-width: 1px; }

.pl-4 { padding-left: 1rem; }
.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }

/* Hidden */
.hidden { display: none; }

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:mt-0 { margin-top: 0; }
}

/* Gradient */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-black { --tw-gradient-from: #000000; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.via-gray-900 { --tw-gradient-to: #111827; }
.to-black { --tw-gradient-to: #000000; }

/* Hero section */
.hero-section {
    background: linear-gradient(160deg, #000000 0%, #0f172a 40%, #111827 60%, #000000 100%);
}

/* Custom Components */
.card {
    background-color: #111827;
    border: 1px solid #1f2937;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.card:hover {
    border-color: #374151;
}

/* ─── Event Cards ─────────────────────────────────────────────────── */

.event-card {
    position: relative;
}

.event-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.event-card-link:hover {
    color: inherit;
}

.event-card-link .text-white {
    color: #ffffff;
}

.event-card-link .text-gray-300 {
    color: #d1d5db;
}

/* ─── Matchup List (inside event cards) ───────────────────────────── */

.matchup-list {
    display: flex;
    flex-direction: column;
}

.matchup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #1f2937;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.15s ease;
    border-radius: 0.25rem;
}

.matchup-row:last-of-type {
    border-bottom: none;
}

.matchup-row:hover {
    background-color: #1f2937;
    color: #ffffff;
}

.matchup-names {
    font-size: 1.0625rem;
    font-weight: 600;
}

.matchup-weight {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 1rem;
    white-space: nowrap;
}

.matchup-more {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #dc2626;
    text-decoration: none;
}

.matchup-more:hover {
    color: #ef4444;
}

@media (max-width: 640px) {
    .matchup-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
    }
    
    .matchup-weight {
        margin-left: 0;
    }
}

/* ─── Feature Icons ───────────────────────────────────────────────── */

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background-color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stat numbers */
.stat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Mobile Menu */
@media (max-width: 767px) {
    #mobile-menu.hidden {
        display: none;
    }
    
    #mobile-menu {
        display: block;
    }
}

/* Responsive Grid for Stats */
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Leading Relaxed */
.leading-relaxed {
    line-height: 1.75;
}

/* Prose Styles for About Page */
.prose {
    color: #d1d5db;
}

.prose strong {
    color: #ffffff;
    font-weight: 600;
}

.prose a {
    color: #dc2626;
}

.prose a:hover {
    color: #ef4444;
}

.prose ul {
    list-style: none;
}

/* Skip to content (accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #dc2626;
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ─── Events Page Tabs ────────────────────────────────────────────── */

.events-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #1f2937;
}

.events-tab {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.events-tab:hover {
    color: #d1d5db;
}

.events-tab.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

/* ─── Previous Results Header + Year Filter ───────────────────────── */

.previous-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.year-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.year-filter select {
    background: #111827;
    color: #fff;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: auto;
}

.year-filter select:hover {
    border-color: #dc2626;
}

.year-filter select:focus {
    outline: 2px solid #dc2626;
    outline-offset: 1px;
}

/* ─── Historical Event Cards ──────────────────────────────────────── */

.historical-event-card {
    display: block;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #fff;
    transition: border-color 0.2s, background 0.2s;
}

.historical-event-card:hover {
    border-color: #dc2626;
    background: #1a2332;
    color: #fff;
}

.hist-event-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.hist-event-meta {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* ─── Fighter Directory Page ──────────────────────────────────────── */

.fighter-search-box {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    display: block;
}

.fighter-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 1rem;
    color: #fff;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.2s;
}

.fighter-search-input::placeholder {
    color: #6b7280;
}

.fighter-search-input:focus {
    border-color: #dc2626;
}

.fighter-search-wrapper {
    position: relative;
}

.fighter-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.fighter-dir-note {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.fighter-results-count {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.fighter-dir-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .fighter-dir-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.fighter-dir-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #fff;
    transition: border-color 0.2s, background 0.2s;
}

.fighter-dir-row:hover {
    border-color: #dc2626;
    background: #1a2332;
    color: #fff;
}

.fighter-dir-name {
    font-weight: 600;
    font-size: 1rem;
}

.fighter-dir-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #9ca3af;
    flex-wrap: wrap;
}

.fighter-dir-record {
    color: #d1d5db;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

@media (max-width: 640px) {
    .fighter-dir-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
