/* ****************************** Home page ***************************/

:root {
        --primary-color: #00ff87;
        --secondary-color: #37003c;
        --card-bg: #ffffff;
        --shadow: 0 2px 4px rgba(0,0,0,0.1);
        --text-primary: #37003c;
        --live-color: lightgreen;
        --finished-color:#ff3e3e; 
        --upcoming-color: brown;
        --pitch-color: #2c7a2c;
        --influence-color: #4a90e2;
        --creativity-color: #50b83c;
        --threat-color: #e2574a;
        --better-stat: #28a745;
        --worse-stat: #dc3545;
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: 'Arial', sans-serif;
    }

    body {
        background: #f4f4f4;
        color: var(--text-primary);
        height: 100%;
        min-height: calc(100vh - 80px);
    }
    /* Hamburger styles */
    .hamburger {
        display: none;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
        margin-left: auto; /* Push hamburger to right */
        padding: 10px;
    }

    .hamburger .bar {
        width: 25px;
        height: 3px;
        background-color: var(--primary-color, #00ff87);
        border-radius: 2px;
    }

    .wrapper {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .main-content {
            flex: 1;
        }
    .navbar {
        background: var(--secondary-color);
        padding: 1rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        color: var(--primary-color);
        font-size: 1.5rem;
        font-weight: bold;
        text-decoration: none;
    }

    .nav-links {
        display: flex;
        gap: 2rem;
    }

    .nav-links a {
        color: white;
        text-decoration: none;
        font-weight: 500;
    }

    .nav-links a::after{
        content: '';
        width: 0%;
        height: 2px;
        background: #f44336;
        display: block;
        margin: auto;
        transition: 0.5s;
        
    }

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

    .hero-section {
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }


    /* Modal Base Styles */
    .disclaimer-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-out;
    }

    .disclaimer-content {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.4s ease-out;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .disclaimer-content p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #333;
    }

    .disclaimer-content button {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    background-color: #00ff87;
    border: none;
    border-radius: 5px;
    color: #37003c;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    }

    .disclaimer-content button:hover {
    background-color: #00e676;
    }

    /* Animations */
    @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
    }

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

    @keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
    }


    .gameweek-info {
        margin-bottom: 2rem;
    }

    .card {
        background: var(--card-bg);
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: var(--shadow);
        transition: transform 0.2s;
    }

    .card.primary {
        background: linear-gradient(135deg, #37003c 0%, #6e0072 50%, #b300b3 100%);
        color: white;
        border-radius: 12px;
        padding: 1.5rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        transition: transform 0.2s ease-in-out;
    }

    .card.primary:hover {
        transform: translateY(-3px);
    }

    .card.primary h2 {
        margin: 0;
        font-size: 1.8rem;
        font-weight: bold;
    }

    .deadline {
        display: flex;
        align-items: center;
        margin-top: 1rem;
        font-size: 1rem;
    }

    .deadline i {
        margin-right: 0.5rem;
        font-size: 1.2rem;
        color: #ffffffcc;
    }

    .deadline .timezone {
        font-weight: 300;
        font-size: 0.9rem;
        margin-left: 0.25rem;
        opacity: 0.8;
    }


    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }

    .player-info {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-top: 1rem;
    }

    .player-info img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
    }

    .fdr-section {
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .fdr-grid {
        margin-top: 1rem;
    }

    .team-row {
        display: flex;
        align-items: center;
        padding: 1rem;
        background: white;
        margin-bottom: 0.5rem;
        border-radius: 8px;
    }

    .team-info {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 200px;
    }

    .team-info img {
        width: 30px;
        height: 30px;
    }

    .fixtures {
        display: flex;
        gap: 0.5rem;
    }

    .fixture {
        padding: 0.5rem;
        border-radius: 4px;
        font-size: 0.875rem;
        min-width: 80px;
        text-align: center;
    }

    .difficulty-1 { background: #9c9c9c; color: white; }
    .difficulty-2 { background: #55ff99; }
    .difficulty-3 { background: #f9bc00; }
    .difficulty-4 { background: #ff5555; color: white; }
    .difficulty-5 { background: #980000; color: white; }

    .transfers-section {
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .tabs {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .tab {
        padding: 0.5rem 1rem;
        border: none;
        background: white;
        border-radius: 4px;
        cursor: pointer;
    }

    .tab.active {
        background: var(--primary-color);
        color: var(--secondary-color);
    }

    .transfer-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
    }

    .player-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        background: white;
        padding: 1rem;
        border-radius: 8px;
    }

    .player-details {
        flex: 1;
    }

    .stats {
        display: flex;
        gap: 2rem;
        margin-top: 0.5rem;
    }

    .stat label {
        font-size: 0.75rem;
        color: #666;
    }

    .watchlist-section {
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
    }

    .match-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }

    .match-card {
        background: white;
        padding: 1rem;
        border-radius: 8px;
    }

    .players-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 1rem;
    }

    .player-pick {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .player-pick img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }



/* ******************************foooter ***************************/
/* Footer styling */
.footer-div {
  background: linear-gradient(135deg, #37003c 0%, #6e0072 50%, #b300b3 100%);
  padding: 1.5rem;
  color: #fff;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease-in;

}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.footer {
  margin-top: 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 1px;
}

/* ****************************** Livescore page ***************************/


/* Header section */
    .header {
        padding: 6rem 2rem 2rem;
        background: var(--secondary-color);
        color: white;
        text-align: center;
    }

    .header h1 {
        margin-bottom: 1rem;
        font-size: 2.5rem;
    }


    .text-box {
        max-width: 800px;
        margin: 0 auto;
    }

    /* Match cards */
    .livescore-container {
        max-width: 1200px;
        margin: 2rem auto;
        padding: 0 1rem;
    }

    .game-day {
        margin: 2rem 0;
    }

    .game-day h2 {
        color: var(--text-primary);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--primary-color);
    }

    .match-card {
        background: white;
        border-radius: 12px;
        margin-bottom: 1rem;
        box-shadow: var(--shadow);
        overflow: hidden;
    }

    .match-header {
        padding: 1rem;
        background: #f8f9fa;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .match-status {
        padding: 0.25rem 0.75rem;
        border-radius: 50px;
        font-size: 0.875rem;
        font-weight: 500;
    }

    .match-status.live {
        background: var(--live-color);
        color: white;
        animation: pulse 2s infinite;
    }

    .match-status.finished {
        background: var(--finished-color);
        color: white;
    }

    .match-status.upcoming {
        background: var(--upcoming-color);
        color: white;
    }

    @keyframes pulse {
        0% { opacity: 1; }
        50% { opacity: 0.5; }
        100% { opacity: 1; }
    }

    .match-content {
        padding: 1.5rem;
        display: grid;
        grid-template-columns: 2fr 1fr 2fr;
        align-items: center;
        gap: 1rem;
    }

    .team {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .team-logo img {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }

    .match-details {
        text-align: center;
    }

    .match-score {
        font-size: 2rem;
        font-weight: bold;
        margin: 1rem 0;
    }

    .match-info {
        background: white;
        border-radius: 12px;
        margin-top: 1rem;
        overflow: hidden;
    }

    .info-header {
        background: var(--secondary-color);
        color: white;
        padding: 0.75rem;
        text-align: center;
    }

    .info-content {
        padding: 1rem;
    }

    .info-row {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 1rem;
        padding: 0.5rem;
        border-bottom: 1px solid #eee;
    }

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

    .bonus {
        color: var(--primary-color);
        font-weight: bold;
    }

    .twitter-link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: #000;
        color: #fff;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
        transition: background 0.3s ease;
    }

    .twitter-link:hover {
        background: #1a1a1a;
        color: #00ff87;
    }

    .twitter-link i {
        font-size: 1rem;
    }


    @media (max-width: 768px) {
        .match-content {
            grid-template-columns: 1fr;
            text-align: center;
        }

        .team {
            margin: 1rem 0;
        }

        .info-row {
            font-size: 0.875rem;
        }
    }



/* ****************************** Formations page ***************************/
/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Formation Summary */
.formation-summary {
    margin: 2rem 0;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.summary-card h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Formation Selector */
.formation-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.formation-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.formation-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.formation-btn.active {
    background: var(--secondary-color);
    color: white;
}

/* Tables */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    box-shadow: var(--shadow);
}

.summary-table th,
.summary-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.summary-table th {
    background: var(--secondary-color);
    color: white;
    font-weight: 500;
}

.summary-table tr:hover {
    background: #f8f9fa;
}

/* Formation Display */
.formation-display {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Pitch */
.pitch {
    background: var(--pitch-color);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    position: relative;
    aspect-ratio: 16/9;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

.position-rows {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.position-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5rem 0;
}

.position-row .player {
    max-width: 100px;
    text-align: center;
    color: white;
    font-weight: bold;
}

.position-row img {
    width: 70px;
    height: auto;
    border-radius: 50%;
}


/* Player Cards */
.formation-player-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.player-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--secondary-color);
}

.player-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.formation-player-info {
    flex: 1;
}

.formation-player-info h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stat {
    text-align: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.stat-value {
    font-weight: bold;
    color: var(--secondary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
}

/* Captain Info */
.captain-info {
    background: var(--secondary-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Position Groups */
.position-group {
    margin-bottom: 2rem;
}

.position-group h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}


/* Fade-in animation */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.player-animated {
  animation: fadeInUp 0.6s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .player-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .formation-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}


/* ****************************** News page ***************************/

.news-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
}

.news-time {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.news-content {
    padding: 1.5rem;
}

.news-content h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.price-change {
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
}

.price-risen {
    background: rgba(40, 167, 69, 0.1);
    color: var(--price-rise);
}

.price-fallen {
    background: rgba(220, 53, 69, 0.1);
    color: var(--price-fall);
}

.news-text {
    color: #666;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .news-container {
        grid-template-columns: 1fr;
    }
}

/* ****************************** Help page ***************************/

.content-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.introduction {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.8;
}

.introduction a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
}

.introduction a:hover {
    color: var(--primary-color);
}

.ict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ict-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.ict-card h2 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ict-card.influence h2 {
    color: var(--influence-color);
}

.ict-card.creativity h2 {
    color: var(--creativity-color);
}

.ict-card.threat h2 {
    color: var(--threat-color);
}

.ict-card p {
    color: #666;
    line-height: 1.8;
}

.icon {
    font-size: 1.5rem;
}

.overall-card {
    background: var(--secondary-color);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
}

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

@media (max-width: 768px) {
    

    .content-container {
        padding: 0 1rem;
    }

    .ict-grid {
        grid-template-columns: 1fr;
    }
}





/* ****************************** Player comparison ***************************/
.selection-bar {
    background: white;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

.player-select {
    padding: 0.75rem;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
    width: 250px;
    font-size: 1rem;
    background: white;
}

.compare-button {
    padding: 0.75rem 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.compare-button:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Comparison Container */
.comparison-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.player-card-comparison{
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

.player-header {
    text-align: center;
    margin-bottom: 2rem;
}

.player-header img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--secondary-color);
    padding: 3px;
}

.player-header h2 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.team {
    color: #666;
    font-size: 0.9rem;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.stat-row:hover {
    background: #f8f9fa;
}

.stat-label {
    font-weight: 500;
    color: var(--secondary-color);
}

.better-stat {
    color: var(--better-stat);
    font-weight: bold;
}

.worse-stat {
    color: var(--worse-stat);
}

.vs-circle {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    align-self: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .selection-bar {
        flex-direction: column;
        padding: 1rem;
    }

    .player-select {
        width: 100%;
    }

    .comparison-container {
        flex-direction: column;
    }

    .vs-circle {
        margin: 1rem 0;
    }
}


/* ******************************Small screens ***************************/
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
        display: none;
    }
    .nav-links a {
        width: 100%;
        padding: 0.5rem;
        background: #4a004f;
        border-radius: 6px;
        text-align: left;
    }


    .hamburger {
        display: flex;
    }

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

    .hero-section,
    .fdr-section,
    .transfers-section,
    .watchlist-section {
        padding: 1rem;
    }

    .stats-grid,
    .transfer-grid,
    .match-cards,
    .players-grid {
        grid-template-columns: 1fr;
    }

    .team-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-info {
        width: 100%;
    }

    .fixtures {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .player-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tabs {
        flex-direction: column;
    }


    .pitch {
        padding: 1rem;
        margin: 1.5rem 0;
        aspect-ratio: auto;  /* Let height adjust automatically */
        height: auto;
        min-height: 300px;   /* Minimum height for visibility */
    }

    /* Stack the position rows vertically on mobile */
    .position-rows {
        flex-direction: column;
        gap: 1rem;
    }

    /* Allow position rows to wrap their players */
    .position-row {
        justify-content: center;
        gap: 0.5rem;
    }

    /* Limit player image size on small screens */
    .position-row img {
        width: 50px;
        height: 50px;
    }

    /* Player name font smaller */
    .position-row .pos b p {
        font-size: 0.75rem;
    }

    /* Formation display container stacks vertically */
    .formation-display {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Stack pitch and team info vertically */
    .formation-display > .pitch,
    .formation-display > .formation-team-info {
        max-width: 100%;
    }

    /* Player cards inside team info shrink */
    .formation-player-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .player-image {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }

    .formation-player-info h4 {
        font-size: 1rem;
    }

    .player-stats {
        grid-template-columns: repeat(2, 1fr);
    }
.match-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem; /* Reduce gap a bit */
        padding: 1rem 0; /* Add vertical padding */
    }

    .team {
        margin: 1rem auto;
        max-width: 150px;
        align-items: center;
        justify-content: center;
    }

    .team-logo img {
        width: 50px;
        height: 50px;
    }

    .match-score {
        font-size: 1.5rem;
        margin: 0.5rem 0;
    }

    .match-details {
        margin: 0.5rem 0;
    }

    .info-row {
        font-size: 0.875rem;
        grid-template-columns: 1fr auto 1fr;
        gap: 0.5rem;
        padding: 0.25rem 0;
    }
    
    .info-content {
        padding: 0.5rem;
    }

}

/* Medium screens (tablets) */
@media (max-width: 1024px) {
    .stats,
    .players-grid {
        flex-direction: column;
    }

    .transfer-grid,
    .match-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .pitch {
        overflow-x: auto;
    }
    .position-row {
        min-width: 300px; /* Adjust depending on players count */
    }
}