/**
 * WrestleFlow Main Stylesheet
 * File: /public_html/wrestling/assets/css/style.css
 * 
 * Wrestling mat themed design with logo colors
 * Last Updated: October 12, 2025
 */

/* ===== CSS Variables - Wrestling Mat Theme ===== */
:root {
    --primary-color: #FF6B35;
    --primary-hover: #E85A2A;
    --secondary-color: #2ECC71;
    --accent-gold: #F4A724;
    --mat-red: #C8102E;
    --mat-green: #00843D;
    
    --bg-color: #ffffff;
    --bg-secondary: #F5F5F0;
    --bg-dark: #1a1a1a;
    --mat-texture: #E8E5D9;
    
    --text-color: #2c2c2c;
    --text-secondary: #666666;
    --text-light: #999999;
    
    --border-color: #d4d4d4;
    --border-radius: 0.5rem;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Container & Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
    background: var(--bg-color);
    border-bottom: 3px solid var(--primary-color);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav a:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.nav a.active {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

/* ===== Hero Section - Wrestling Mat Style ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--mat-red) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===== Mat Circle Design Element ===== */
.mat-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 8px solid rgba(255,255,255,0.3);
    position: relative;
    margin: 2rem auto;
}

.mat-circle::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid rgba(255,255,255,0.5);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mat-circle::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== Tournament Search Section ===== */
.search-section {
    background: var(--mat-texture);
    padding: 3rem 0;
    border-top: 4px solid var(--accent-gold);
    border-bottom: 4px solid var(--accent-gold);
}

.search-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.search-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.search-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form select,
.search-form input {
    flex: 1;
    min-width: 200px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.card-body {
    padding: 0;
}

.card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
}

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

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #27AE60;
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--accent-gold);
    color: white;
}

.btn-gold:hover {
    background: #E09616;
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--mat-red);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* ===== Alerts & Messages ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--secondary-color);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: var(--mat-red);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--accent-gold);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, var(--primary-color), var(--mat-red));
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 3px solid var(--accent-gold);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: rgba(255, 107, 53, 0.05);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Grid System ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ===== Feature Cards ===== */
.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Tournament Card ===== */
.tournament-card {
    border-left: 6px solid var(--secondary-color);
    transition: var(--transition);
}

.tournament-card:hover {
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.tournament-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tournament-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 1rem; }

.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--primary-color); }
.text-danger { color: var(--mat-red); }
.text-success { color: var(--secondary-color); }

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-primary { background: var(--primary-color); color: white; }
.badge-success { background: var(--secondary-color); color: white; }
.badge-danger { background: var(--mat-red); color: white; }
.badge-warning { background: var(--accent-gold); color: white; }
.badge-secondary { background: var(--text-secondary); color: white; }
.badge-info { background: #17a2b8; color: white; }

/* ===== Loading Spinner ===== */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* ===== Dashboard Specific ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-top: 4px solid var(--primary-color);
}

.stat-card:nth-child(2) {
    border-top-color: var(--secondary-color);
}

.stat-card:nth-child(3) {
    border-top-color: var(--accent-gold);
}

.stat-card:nth-child(4) {
    border-top-color: var(--mat-red);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--mat-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.footer img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col, .col-1, .col-2, .col-3, .col-4, .col-6, .col-8, .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form select,
    .search-form input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .logo {
        height: 50px;
    }
}