/* Sports Puff - Ultra-Modern Snazzy Interface */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* Main Container - Perfectly Centered */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    gap: 30px;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.2);
}

/* Header with Floating Animation */
.header {
    text-align: center;
    padding: 40px 50px;
    color: white;
    position: relative;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate 10s linear infinite;
    pointer-events: none;
}

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

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.logo {
    font-size: 4rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ff6b6b, #ffa726, #42a5f5, #66bb6a, #ab47bc);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 8s ease infinite;
}

@keyframes textGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo-emoji {
    font-size: 3rem;
    animation: bounce 3s infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(0deg); }
    10% { transform: translateY(-8px) rotate(-5deg); }
    30% { transform: translateY(-15px) rotate(5deg); }
    40% { transform: translateY(-10px) rotate(-3deg); }
    60% { transform: translateY(-5px) rotate(2deg); }
}

.tagline {
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Main Content Grid */
.main-content {
    display: grid;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    grid-template-columns: 1fr;
    align-items: start;
}

/* Search Section - Ultra Modern */
.search-section {
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.search-section h2 {
    color: white;
    margin-bottom: 30px;
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.search-section h2::before {
    content: "🔍";
    font-size: 2rem;
    animation: pulse 2s infinite;
}

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

.search-form {
    display: grid;
    gap: 30px;
}

/* Form Styling - Futuristic */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.form-control {
    padding: 16px 20px;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 15px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.form-control:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Date Section - Floating Cards */
.date-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.date-section::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 4s linear infinite;
    opacity: 0.7;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.date-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.date-section h3::before {
    content: "📅";
    font-size: 1.3rem;
    animation: wiggle 3s infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.date-selectors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

/* Quick Date Buttons - Neon Style */
.quick-date-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-date-btn {
    padding: 12px 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.quick-date-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.quick-date-btn:hover::before {
    left: 100%;
}

.quick-date-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.quick-date-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Action Buttons - Hero Style */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.primary-btn {
    padding: 18px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.primary-btn:hover::before {
    transform: translateX(100%);
}

.primary-btn:hover {
    background-position: right center;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.secondary-btn {
    padding: 18px 40px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Results Section - Holographic */
.results-section {
    padding: 40px;
    position: relative;
}

.results-section::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    border-radius: 25px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    to { transform: rotate(360deg); }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.results-header h3 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.results-header h3::before {
    content: "📊";
    font-size: 1.5rem;
    animation: dataFlow 2s infinite;
}

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

.result-actions {
    display: flex;
    gap: 12px;
}

.copy-btn, .toggle-btn {
    padding: 12px 20px;
    background: linear-gradient(45deg, #17a2b8, #20c997);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(23, 162, 184, 0.3);
}

.copy-btn:hover, .toggle-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px rgba(23, 162, 184, 0.4);
}

.results-content {
    background: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    padding: 25px;
    border-radius: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 0, 0.3);
    box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.1);
    position: relative;
}

.results-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ff00, transparent);
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* API Documentation - Floating Cards */
.api-documentation {
    padding: 40px;
}

.api-documentation h3 {
    color: white;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.api-documentation h3::before {
    content: "📚";
    font-size: 1.8rem;
    animation: bookFlip 4s infinite;
}

@keyframes bookFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 35px;
}

.api-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.api-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.api-card:hover::before {
    opacity: 1;
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.api-card:hover {
    transform: translateY(-8px) rotateX(5deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.api-card h4 {
    color: white;
    margin-bottom: 18px;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.api-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.api-format {
    background: rgba(0, 0, 0, 0.6);
    color: #00ff88;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.95rem;
    overflow-x: auto;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.api-examples p {
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.example-code {
    background: rgba(0, 0, 0, 0.7);
    color: #ffaa00;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    border-left: 4px solid #ffaa00;
    transition: all 0.3s ease;
}

.example-code:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 170, 0, 0.2);
}

/* Supported Leagues - Floating Badges */
.supported-leagues {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.supported-leagues h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.supported-leagues h4::before {
    content: "🏆";
    font-size: 1.2rem;
    animation: trophy 3s infinite;
}

@keyframes trophy {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

.league-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.league-badge {
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.league-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.league-badge:hover::before {
    width: 100%;
    height: 100%;
}

.league-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.league-badge.wnba { 
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}
.league-badge.nba { 
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
}
.league-badge.nfl { 
    background: linear-gradient(135deg, #0f3460, #e94560);
    box-shadow: 0 6px 20px rgba(15, 52, 96, 0.4);
}
.league-badge.mlb { 
    background: linear-gradient(135deg, #2d3436, #636e72);
    box-shadow: 0 6px 20px rgba(45, 52, 54, 0.4);
}
.league-badge.nhl { 
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    box-shadow: 0 6px 20px rgba(116, 185, 255, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 20px;
    padding: 30px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-links {
    margin-top: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: #3498db;
    transform: translateY(-1px);
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error States */
.success {
    border-left: 4px solid #28a745;
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.1), transparent);
}

.error {
    border-left: 4px solid #dc3545;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1), transparent);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 3rem;
    }
    
    .logo-emoji {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
        gap: 20px;
    }
    
    .header {
        padding: 30px 25px;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .logo-emoji {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .date-selectors {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .league-badges {
        justify-content: center;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .result-actions {
        justify-content: center;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
    }
    
    .quick-date-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quick-date-btn {
        width: 100%;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .glass-card {
        background: rgba(255, 255, 255, 0.95);
        color: #000;
        border: 2px solid #000;
    }
    
    .form-control {
        background: #fff;
        border: 2px solid #000;
        color: #000;
    }
}