@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;600;700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary-color: #002D72;
    --secondary-color: #FFC425;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #1a1a1a;
    --grass-green: #2d5016;
    --dirt-brown: #8B4513;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: linear-gradient(135deg, #001f4d 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
}

.navbar-brand {
    font-family: 'Bebas Neue', cursive;
    font-size: 2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
}

.navbar-brand:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004494 100%);
    padding: 120px 0;
    position: relative;
    overflow: visible;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 196, 37, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 196, 37, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    background-size: 100% 100%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,50 Q360,0 720,50 T1440,50 L1440,100 L0,100 Z'/%3E%3C/svg%3E");
    background-size: cover;
}

.hero-section h1 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: slideInFromTop 1s ease-out;
}

.hero-section .lead {
    font-size: 1.3rem;
    opacity: 0.95;
    animation: slideInFromBottom 1s ease-out;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.card {
    border: none;
    border-radius: 15px;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    position: relative;
}

.card.overflow-hidden {
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-color);
    margin: -2px;
}

.card-body {
    position: relative;
}

#playerSearch {
    border: 2px solid transparent;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-color), var(--secondary-color)) border-box;
}

#playerSearch:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 196, 37, 0.2);
    transform: scale(1.02);
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: 10000;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 99999 !important;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.search-results.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.search-result-item {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.search-result-item::before {
    content: '⚾';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-result-item:hover {
    background: linear-gradient(90deg, rgba(0, 45, 114, 0.05) 0%, rgba(255, 196, 37, 0.05) 100%);
    padding-left: 45px;
}

.search-result-item:hover::before {
    opacity: 1;
}

.search-result-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-family: 'Oswald', sans-serif;
}

.search-result-id {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 3px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::after {
    content: '⚾';
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 100px;
    opacity: 0.05;
    transform: rotate(-15deg);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Bebas Neue', cursive;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-top: 5px;
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), #003d8f);
    color: white;
}

.table thead th {
    border: none;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(0, 45, 114, 0.05) 0%, rgba(255, 196, 37, 0.05) 100%);
    transform: scale(1.01);
}

.spinner-border {
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.display-3 {
    font-size: 4rem;
}

.display-5 {
    font-family: 'Oswald', sans-serif;
}

.bi-circle-fill {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #003d8f);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 45, 114, 0.3);
}

/* Baseball field background pattern */
.hero-section {
    position: relative;
    background: 
        radial-gradient(ellipse at center bottom, var(--grass-green) 0%, transparent 70%),
        linear-gradient(135deg, var(--primary-color) 0%, #004494 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* Loading animation */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    background-size: 200% 100%;
    animation: loading 1.5s linear infinite;
    z-index: 9999;
    display: none;
}

.loading-bar.active {
    display: block;
}

@keyframes loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.text-pre-wrap {
    white-space: pre-wrap;
    font-family: inherit;
}

/* Team Cards */
.team-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.team-card .card-body {
    padding: 1.5rem;
}

.team-card .card-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}