:root {
    --primary-color: #0066cc;
    --secondary-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #ffffff;
    --muted-text: #666666;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

/* Dark mode base */
.dark-mode {
    --bg-color: #121212;
    --text-color: #e6e6e6;
    --card-bg: #1e1e1e;
    --muted-text: #b3b3b3;
}

.dark-mode .prediction-card,
.dark-mode .prediction-detail-card,
.dark-mode .widget,
.dark-mode .chart-container,
.dark-mode .contact-form,
.dark-mode .contact-info,
.dark-mode .stat-card,
.dark-mode .analysis-card,
.dark-mode .about-content {
    background: var(--card-bg);
    color: var(--text-color);
}

.dark-mode .prediction-card .card-header {
    background: linear-gradient(90deg, #004c99 60%, #1f7a36 100%);
}

.dark-mode .page-description,
.dark-mode .comment-content {
    color: var(--muted-text);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    color: white;
    padding: 100px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
    animation: float 20s infinite linear;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Prediction Cards */
.prediction-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
}

.prediction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.prediction-card:hover::before {
    transform: scaleX(1);
}

.prediction-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.prediction-card .card-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    border: none;
}

.prediction-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

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

.prediction-details p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Confidence Levels */
.confidence-yüksek {
    color: var(--secondary-color);
    font-weight: 600;
}

.confidence-orta {
    color: var(--warning-color);
    font-weight: 600;
}

.confidence-düşük {
    color: var(--danger-color);
    font-weight: 600;
}

/* Statistics Section */
.statistics-section {
    background: var(--light-color);
}

.stat-item {
    padding: 2rem;
    text-align: center;
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Page Titles */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Prediction Detail Page */
.prediction-detail-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.match-info {
    margin-top: 1rem;
}

.prediction-summary {
    background: rgba(0,0,0,0.03);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.analysis {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Comments Section */
.comments-section {
    border-top: 2px solid var(--light-color);
    padding-top: 2rem;
}

.comment-form {
    background: rgba(0,0,0,0.03);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

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

.comment-content {
    color: #666;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.widget h5 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.related-prediction {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.related-prediction:last-child {
    border-bottom: none;
}

.related-prediction h6 a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
}

.related-prediction h6 a:hover {
    color: var(--primary-color);
}

/* Contact Page Styles */
.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.contact-info {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.contact-item h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-item p {
    margin: 0;
    color: #666;
}

/* Statistics Page Styles */
.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chart-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.chart-container h4 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

/* Analysis Page Styles */
.analysis-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.analysis-meta {
    margin-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.team-comparison {
    padding: 2rem 0;
}

.team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.vs-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
}

.stats-comparison {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.stat-row:last-child {
    border-bottom: none;
}

.analysis-content {
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.popular-analysis .popular-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.popular-analysis .popular-item:last-child {
    border-bottom: none;
}

.popular-analysis h6 a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
}

.popular-analysis h6 a:hover {
    color: var(--primary-color);
}

/* About Page Styles */
.about-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Accessibility: focus styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(0,102,204,0.35);
    outline-offset: 2px;
}

/* Utilities */
.text-muted-strong { color: var(--muted-text) !important; }
.bg-card { background: var(--card-bg) !important; }

.about-content h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-content h3:first-of-type {
    margin-top: 1rem;
}

.feature-list li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .team-comparison .col-md-2 {
        margin: 1rem 0;
    }
    
    .vs-text {
        height: 50px;
        font-size: 1.5rem;
    }
    
    .team-logo {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .prediction-card {
        margin-bottom: 2rem;
    }
    
    .sidebar {
        position: static;
        margin-top: 3rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .prediction-card .card-header {
        padding: 1rem;
    }
    
    .prediction-card .card-body {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Animate in class for scroll animations */
.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.btn {
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #0052a3;
    border-color: #0052a3;
    transform: translateY(-2px);
}

/* Advanced Button Styles */
.btn-gradient {
    background: linear-gradient(45deg, var(--primary-color), #0052a3);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

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

/* Pulse Animation for CTAs */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 204, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

/* Advanced Typography */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

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

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}

/* Advanced Card Hover Effects */
.card-3d {
    perspective: 1000px;
}

.card-3d-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Floating Elements */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* Advanced Statistics Cards */
.stat-card-advanced {
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 102, 204, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card-advanced::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 102, 204, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.stat-card-advanced:hover::after {
    right: -30%;
}

/* Enhanced Form Styling */
.form-floating-modern {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating-modern input,
.form-floating-modern textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: transparent;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-floating-modern label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    background: white;
    padding: 0 0.5rem;
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-floating-modern input:focus,
.form-floating-modern textarea:focus,
.form-floating-modern input:not(:placeholder-shown),
.form-floating-modern textarea:not(:placeholder-shown) {
    border-color: var(--primary-color);
}

.form-floating-modern input:focus + label,
.form-floating-modern textarea:focus + label,
.form-floating-modern input:not(:placeholder-shown) + label,
.form-floating-modern textarea:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.875rem;
    color: var(--primary-color);
}

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

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Advanced Navbar */
.navbar-advanced {
    backdrop-filter: blur(10px);
    background: rgba(0, 102, 204, 0.95);
    transition: all 0.3s ease;
}

.navbar-scrolled {
    background: rgba(0, 102, 204, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Particle Background Effect */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particle-float 6s infinite linear;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Advanced Tables */
.table-modern {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.table-modern thead th {
    background: linear-gradient(135deg, var(--primary-color), #0052a3);
    color: white;
    font-weight: 600;
    padding: 1.5rem 1rem;
    border: none;
}

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

.table-modern tbody tr:hover {
    background: rgba(0, 102, 204, 0.05);
    transform: scale(1.01);
}

/* Success/Error Messages */
.alert-modern {
    border: none;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.alert-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.alert-success-modern {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger-modern {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Dark Mode Support */
.dark-mode {
    --light-color: #1a1a1a;
    --dark-color: #ffffff;
    background-color: #121212 !important;
    color: #ffffff !important;
}

.dark-mode .prediction-card,
.dark-mode .widget,
.dark-mode .contact-form,
.dark-mode .contact-info {
    background: #1e1e1e !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

.dark-mode .form-control {
    background: #2a2a2a !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

.dark-mode .navbar {
    background: linear-gradient(90deg, #1a1a1a 0%, #0044aa 60%, #1e6f3e 100%) !important;
}

.dark-mode .card {
    background: #1e1e1e !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

.dark-mode .btn-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.dark-mode .text-dark {
    color: #ffffff !important;
}

.dark-mode .bg-light {
    background: #1a1a1a !important;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .comment-form {
        display: none !important;
    }
    
    .prediction-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section {
        background-attachment: fixed;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .prediction-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .prediction-card {
        transition: none;
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Modern Scrollbar for Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--light-color);
}

/* Gradient Text Effects */
.gradient-text-primary {
    background: linear-gradient(45deg, var(--primary-color), #0052a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-success {
    background: linear-gradient(45deg, var(--secondary-color), #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
