:root {
    --primary-navy: #0C2340;
    --secondary-navy: #13315C;
    --baseball-red: #BF0D3E;
    --cream: #F5F0E1;
    --tan: #D4C19C;
    --dark-brown: #3D2914;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glow-red: rgba(191, 13, 62, 0.4);
    --glow-navy: rgba(12, 35, 64, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--primary-navy);
    background: linear-gradient(180deg, #0a1628 0%, #0C2340 50%, #13315C 100%);
}

main {
    flex: 1;
}

.navbar {
    background: rgba(12, 35, 64, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--white), var(--cream));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section {
    background: linear-gradient(135deg, #0a1628 0%, var(--primary-navy) 40%, var(--secondary-navy) 100%);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--glow-red) 0%, transparent 40%),
                radial-gradient(circle at 70% 80%, var(--glow-navy) 0%, transparent 40%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.min-vh-75 {
    min-height: 75vh;
}

.text-accent {
    background: linear-gradient(135deg, var(--baseball-red), #ff4d6d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.batter-image {
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 60px var(--glow-red);
    max-width: 100%;
    height: auto;
    border: 1px solid var(--glass-border);
}

.analytics-preview {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.preview-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: var(--baseball-red); }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c940; }

.preview-content {
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label {
    width: 120px;
    font-weight: 600;
    color: var(--white);
}

.stat-bar {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 16px;
    border: 1px solid var(--glass-border);
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-navy), var(--secondary-navy));
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 20px var(--glow-navy);
}

.stat-fill.contact {
    background: linear-gradient(90deg, var(--baseball-red), #ff4d6d);
    box-shadow: 0 0 20px var(--glow-red);
}

.stat-fill.hit {
    background: linear-gradient(90deg, var(--success-green), #20c997);
}

.stat-value {
    width: 50px;
    font-weight: 700;
    text-align: right;
    color: var(--white);
}

.features-section {
    background: linear-gradient(180deg, var(--secondary-navy) 0%, #0a1628 100%);
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(191, 13, 62, 0.2), 0 0 40px var(--glow-red);
    border-color: rgba(191, 13, 62, 0.5);
}

.feature-card h5, .feature-card p {
    color: var(--white);
}

.feature-card p {
    opacity: 0.8;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--baseball-red), #ff4d6d);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
    box-shadow: 0 10px 40px var(--glow-red);
}

.analysis-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    height: 100%;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.analysis-card:hover {
    border-color: rgba(191, 13, 62, 0.5);
    box-shadow: 0 20px 60px rgba(191, 13, 62, 0.15), 0 0 40px var(--glow-red);
    transform: translateY(-4px);
}

.analysis-card .analysis-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--baseball-red), #ff4d6d);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 20px;
    box-shadow: 0 8px 30px var(--glow-red);
}

.analysis-card h3 {
    color: var(--white);
    margin-bottom: 12px;
}

.analysis-card p, .analysis-card .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.feature-list li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

.feature-list li i {
    color: var(--baseball-red);
    margin-right: 8px;
}

.cta-section {
    background: linear-gradient(135deg, var(--baseball-red), #ff4d6d);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-section .btn-light {
    background: var(--white);
    color: var(--baseball-red);
    border: none;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-light:hover {
    background: var(--cream);
    color: var(--primary-navy);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--baseball-red), #ff4d6d);
    border: none;
    box-shadow: 0 8px 30px var(--glow-red);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a00b34, var(--baseball-red));
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--glow-red);
}

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

.btn-outline-primary:hover {
    background: var(--baseball-red);
    border-color: var(--baseball-red);
    box-shadow: 0 8px 30px var(--glow-red);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 48px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.upload-zone:hover {
    border-color: var(--baseball-red);
    background: rgba(191, 13, 62, 0.1);
    box-shadow: 0 0 40px var(--glow-red);
}

.upload-label {
    cursor: pointer;
    display: block;
    color: rgba(255, 255, 255, 0.7);
}

.upload-label i {
    color: var(--baseball-red);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.file-info i {
    font-size: 1.5rem;
    color: var(--white);
}

.tips-list, .output-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li, .output-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.tips-list li:last-child, .output-list li:last-child {
    border-bottom: none;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    background: linear-gradient(135deg, var(--baseball-red), #ff4d6d);
    box-shadow: 0 8px 30px var(--glow-red);
}

.stat-card .stat-content {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    width: auto;
    text-align: left;
    color: var(--white);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    width: auto;
}

.mini-stat {
    display: flex;
    flex-direction: column;
}

.mini-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.mini-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state {
    padding: 60px 20px;
}

.error-page h1 {
    font-weight: 700;
    color: var(--baseball-red);
}

footer {
    margin-top: auto;
    background: rgba(12, 35, 64, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
}

footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--baseball-red) !important;
}

.bg-light {
    background: linear-gradient(180deg, #0a1628 0%, var(--primary-navy) 100%) !important;
}

.container.py-5 {
    color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--white);
}

.text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

.lead {
    color: rgba(255, 255, 255, 0.9);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.card-header {
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 16px 16px 0 0 !important;
}

.card-body {
    color: var(--white);
}

.card-footer {
    border-top: 1px solid var(--glass-border);
}

.table {
    background: transparent;
    color: var(--white);
}

.table thead th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--white);
    border: none;
}

.table td, .table th {
    border-color: var(--glass-border);
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--baseball-red), #ff4d6d) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy)) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--success-green), #20c997) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f0ad4e, #ec971f) !important;
    color: #000 !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.form-control, .form-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--white);
    border-radius: 10px;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--baseball-red);
    box-shadow: 0 0 20px var(--glow-red);
    color: var(--white);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-label {
    color: var(--white);
    font-weight: 500;
}

.breadcrumb {
    background: transparent;
}

.breadcrumb-item a {
    color: var(--baseball-red);
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.6);
}

.alert {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--white);
    border-radius: 12px;
}

.btn-outline-secondary {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
}

.btn-outline-success {
    color: var(--success-green);
    border-color: var(--success-green);
}

.btn-outline-success:hover {
    background: var(--success-green);
    border-color: var(--success-green);
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
}

.spinner-border {
    color: var(--baseball-red);
}

.light-section {
    background: var(--white) !important;
}

.light-section h2, .light-section h3, .light-section h4, .light-section h5 {
    color: var(--primary-navy) !important;
}

.light-section p, .light-section li, .light-section .text-muted {
    color: var(--medium-gray) !important;
}

.light-section strong {
    color: var(--primary-navy) !important;
}

.light-section .stat-label, .light-section .stat-value {
    color: var(--primary-navy) !important;
}

.light-section .analytics-preview {
    background: rgba(12, 35, 64, 0.05);
    border: 1px solid var(--tan);
}

.light-section .preview-content {
    background: var(--cream);
}

.cream-section {
    background: var(--cream) !important;
}

.cream-section h2, .cream-section h3, .cream-section h4, .cream-section h5 {
    color: var(--primary-navy) !important;
}

.cream-section p, .cream-section .text-muted, .cream-section .lead {
    color: var(--medium-gray) !important;
}

.cream-section .card {
    background: var(--white);
    border: 2px dashed var(--tan) !important;
}

.cream-section .card h5 {
    color: var(--primary-navy) !important;
}

.cream-section .card p {
    color: var(--medium-gray) !important;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 60px 0;
    }
    
    .batter-image {
        margin-top: 40px;
    }
    
    .stat-row {
        flex-wrap: wrap;
    }
    
    .stat-label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .stat-bar {
        margin: 0;
        margin-right: 12px;
    }
}
