/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: #1a237e;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    color: #ffcc00;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(26, 35, 126, 0.85), rgba(26, 35, 126, 0.9)), url('https://images.unsplash.com/photo-1636489953081-c2faa8b5b7b8?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80') no-repeat center center/cover;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    background-color: #ffcc00;
    color: #1a237e;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #ffd633;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #1a237e;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section p {
    text-align: center;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

/* Live Scores */
#liveMatches {
    min-height: 200px;
}

.match-card {
    background: #f1f8ff;
    border-left: 5px solid #1a237e;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.match-card.live {
    border-left-color: #4CAF50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.match-teams {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.match-score {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
}

.match-status {
    display: inline-block;
    padding: 5px 15px;
    background: #e3f2fd;
    color: #1a237e;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.match-status.live {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Countries/Teams */
.filter {
    margin-bottom: 25px;
}

#countrySearch {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border 0.3s;
}

#countrySearch:focus {
    border-color: #1a237e;
    outline: none;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.country-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid #eee;
}

.country-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.country-flag {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.country-name {
    font-weight: bold;
    color: #1a237e;
}

/* Blog */
.blog-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border-top: 4px solid #1a237e;
}

.blog-card:hover {
    transform: translateY(-10px);
}

.blog-card h3 {
    color: #1a237e;
    margin-bottom: 15px;
}

.blog-card p {
    text-align: left;
    color: #666;
    margin-bottom: 20px;
}

.read-more {
    color: #ff9800;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: #f57c00;
}

/* Ad Section */
.ad-section {
    padding: 40px 0;
}

.ad-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

/* Footer */
.footer {
    background: #1a237e;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bbdefb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ffcc00;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3949ab;
    color: #bbdefb;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #bbdefb;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* ==================== MATCH PREDICTION STYLES ==================== */
.prediction-controls {
    margin-bottom: 40px;
}

.prediction-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a237e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prediction-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: white;
}

.prediction-select:focus {
    border-color: #1a237e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.predict-btn {
    background-color: #1a237e;
    color: white;
    grid-column: span 1;
}

.auto-predict-btn {
    background-color: #ff9800;
    color: white;
    grid-column: span 1;
}

.predict-btn:hover {
    background-color: #283593;
}

.auto-predict-btn:hover {
    background-color: #f57c00;
}

/* Prediction Results */
.prediction-results {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.prediction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.matchup-display {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.team-badge {
    background-color: #1a237e;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    min-width: 100px;
    text-align: center;
}

.vs-text {
    color: #666;
    font-size: 1rem;
}

/* Probability Bars */
.probability-section {
    margin-bottom: 40px;
}

.probability-bars {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

.probability-bar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.team-label {
    min-width: 120px;
    font-weight: bold;
    color: #333;
}

.bar-container {
    flex-grow: 1;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease-in-out;
    position: relative;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
                transparent 0%, 
                rgba(255,255,255,0.3) 50%, 
                transparent 100%);
    animation: shimmer 2s infinite;
}

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

.percentage {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: #333;
    font-size: 1.1rem;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.analysis-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px;
    border-left: 5px solid #1a237e;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

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

.analysis-icon {
    font-size: 2.5rem;
    color: #1a237e;
    margin-bottom: 15px;
}

.analysis-content h5 {
    color: #1a237e;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.winner-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 5px;
}

.confidence, .player-role, .match-tip {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Factors Section */
.factors-section {
    margin-bottom: 40px;
}

.factors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.factor-item.positive {
    border-left: 4px solid #4CAF50;
}

.factor-item.neutral {
    border-left: 4px solid #FFC107;
}

.factor-item.negative {
    border-left: 4px solid #F44336;
}

.factor-item i {
    font-size: 1.2rem;
}

.factor-item.positive i {
    color: #4CAF50;
}

.factor-item.neutral i {
    color: #FFC107;
}

.factor-item.negative i {
    color: #F44336;
}

/* History Table */
.history-table {
    overflow-x: auto;
    margin-top: 20px;
}

#predictionHistory {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

#predictionHistory th {
    background-color: #1a237e;
    color: white;
    padding: 15px;
    text-align: left;
}

#predictionHistory td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

#predictionHistory tr:hover {
    background-color: #f9f9f9;
}

.prediction-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.prediction-footer p {
    color: #666;
    max-width: 600px;
}

.save-btn {
    background-color: #4CAF50;
    color: white;
}

.save-btn:hover {
    background-color: #388E3C;
}

/* Team Colors for Visual Variety */
.team1-color { color: #1a237e; }  /* Dark Blue */
.team2-color { color: #ff5722; }  /* Orange */
.team3-color { color: #4CAF50; }  /* Green */
.team4-color { color: #9C27B0; }  /* Purple */

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #1a237e;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .blog-preview {
        grid-template-columns: 1fr;
    }

    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .match-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Prediction Responsive */
    .prediction-form {
        grid-template-columns: 1fr;
    }
    
    .prediction-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .probability-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .team-label {
        min-width: auto;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .prediction-footer {
        flex-direction: column;
        text-align: center;
    }
}

/* Error and Loading States */
.error {
    color: #f44336;
    text-align: center;
    padding: 20px;
    background-color: #ffebee;
    border-radius: 8px;
    border-left: 4px solid #f44336;
}

/* Success States */
.success {
    color: #4CAF50;
    text-align: center;
    padding: 20px;
    background-color: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}