body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #1a1a1a;
    color: white;
}

#game-container {
    max-width: 800px;
    margin: 0 auto;
}

.dashboard {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    background-color: #333;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #0f6f00;
    color: white;
    cursor: pointer;
    margin: 5px;
}

button:hover {
    background-color: #45a049;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    transition: opacity 0.3s ease;
    align-items: center;
}
.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    transition: transform 0.3s ease;
}
.modal.hidden .modal-content {
    transform: translateY(-50px);
}

.hidden {
    display: none;
}

.choice-button {
    display: block;
    width: 100%;
    margin: 10px 0;
    background-color: #333;
}

.choice-button:hover {
    background-color: #404040;
}

.tooltip {
    font-size: 0.8em;
    color: #888;
    margin-top: 5px;
}

.chart-container {
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
    height: 300px;
}

.reset-button {
    background-color: #ff4444;
    position: fixed;
    top: 650px;
    right: 20px;
    cursor: pointer;
}

.reset-button:hover {
    background-color: #cc0000;
}

.league-container {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.standings table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.standings th, .standings td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #444;
}

.standings th {
    background-color: #333;
}

.standings tr:hover {
    background-color: #373737;
}

.user-team {
    background-color: #001cd0 !important;
    font-weight: bold;
}

.relegation-zone {
    background-color: #5d0000;
}

.promotion-zone {
    background-color: #005b00;
}

.stat-item:nth-child(5) {
    grid-column: span 2;
}

.standings td:nth-child(2) {
    text-align: left;
    padding-left: 15px;
}

#round {
    grid-column: span 2;
}

#season {
    grid-column: span 2;
}

.stat-item h3 {
    margin: 0 0 5px 0;
    font-size: 0.9em;
}

.stat-item p {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}

#event-text.final-standing {
    font-size: 1.1em;
    line-height: 1.5;
    padding: 15px;
    background-color: #3a3a3a;
    border-radius: 5px;
    margin: 10px 0;
}

.choice-button.new-season {
    background-color: #2196F3;
    margin-top: 20px;
}

.choice-button.new-season:hover {
    background-color: #1976D2;
}

.chart-container {
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
    height: 300px;
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    .charts-container {
        grid-template-columns: 1fr;
    }
    .stat-item {
        min-width: 120px;
    }
}

.team-overall {
    font-size: 0.8em;
    color: #888;
    display: block;
}

.standings td:nth-child(2)::after {
    content: attr(data-overall);
    font-size: 0.7em;
    color: #666;
    display: block;
}

.league-container button {
    background-color: #2196F3;
    padding: 8px 15px;
}

.league-container button:hover {
    background-color: #1976D2;
}

.stat-item p[id="form"],
.stat-item p[id="morale"] {
    font-size: 1.1em;
    font-weight: bold;
    padding: 3px;
    border-radius: 3px;
}

.stat-item p[id="goals"] {
    color: #4CAF50;
}

.stat-item p[id="assists"] {
    color: #2196F3;
}

.stat-item:nth-child(7),
.stat-item:nth-child(8) {
    grid-column: span 1;
}

@media (max-width: 600px) {
    .stat-item:nth-child(n+7) {
        grid-column: span 2;
    }
}

.trophy-case {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-left: 20px;
    width: 250px;
    position: fixed;
    right: 20px;
    top: 20px;
}

.trophy-case h2 {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    color: #FFD700;
    text-align: center;
}

#titles-list {
    max-height: 400px;
    overflow-y: auto;
}

.title-item {
    background-color: #333;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-item span {
    color: #FFD700;
    font-size: 1.2em;
    min-width: 30px;
    text-align: center;
}

@media (max-width: 1200px) {
    .trophy-case {
        position: static;
        width: auto;
        margin-left: 0;
        margin-top: 20px;
    }
}

.event-history {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-left: 20px;
    width: 250px;
    position: fixed;
    left: 20px;
    right: 300px;
    top: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.event-history h2 {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    color: #4CAF50;
    text-align: center;
}

.event-item {
    background-color: #333;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.event-item span {
    color: #4CAF50;
}

@media (max-width: 1200px) {
    .event-history {
        position: static;
        width: auto;
        margin-left: 0;
        margin-top: 20px;
    }
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.stat-box {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-box h3 {
    margin: 0 0 8px 0;
    font-size: 0.95em;
    color: #888;
}

.stat-box p {
    margin: 0;
    font-size: 1.4em;
    font-weight: bold;
    color: #4CAF50;
}

#top-scorer { 
    color: #FFD700; 
}

#top-assists { 
    color: #2196F3; 
}

@media (max-width: 600px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
}

.story-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    max-width: 800px;
    background: linear-gradient(to right, #1a1a2e, #16213e);
    border: 2px solid #4CAF50;
    border-radius: 15px;
    overflow: hidden;
}

.story-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: sepia(0.3) brightness(0.9);
    display: block;
}

.story-text {
    padding: 25px;
    color: #e6f7ff;
}

.story-icon {
    font-size: 1.8em;
    margin-right: 10px;
    vertical-align: middle;
}

.story-choice {
    background: #4CAF50 !important;
    margin-top: 20px;
    padding: 12px 25px !important;
    font-size: 1.1em !important;
    transition: transform 0.2s;
}

.story-choice:hover {
    transform: scale(1.05);
    background: #45a049 !important;
}

#background-music {
    display: none;
}

.music-button {

    background-color: #4CAF50;
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid #fff;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.music-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

@media (max-width: 768px) {
    .music-button {
        top: 5px;
        left: 5px;
        padding: 6px 12px;
        font-size: 0.8em;
    }
}
@media (max-width: 768px) {
    .story-content {
        grid-template-columns: 1fr;
        max-width: 90%;
    }
    
    .story-image {
        height: 200px;
    }
}

/* Mobile Optimization Additions */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    #game-container {
        display: flex;
        flex-direction: column;
    }

    .dashboard, .league-container, .charts-container {
        width: 100%;
        padding: 15px;
        margin-bottom: 15px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-item {
        padding: 8px;
        min-width: unset;
    }

    .stat-item h3 {
        font-size: 0.8em;
    }

    .stat-item p {
        font-size: 1em;
    }

    .trophy-case, .event-history {
        position: relative;
        width: 100%;
        margin: 10px 0;
        left: 0;
        right: 0;
        top: 0;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .standings table {
        font-size: 0.8em;
    }

    .standings th, .standings td {
        padding: 6px;
    }

    .league-container button {
        width: 48%;
        padding: 8px;
        font-size: 0.9em;
    }

    .charts-container {
        order: 3;
    }

    .story-content {
        width: 95%;
        margin: 10px;
    }

    .story-image {
        height: 150px;
    }

    .story-text {
        padding: 15px;
        font-size: 0.9em;
    }

    button {
        font-size: 0.9em;
        padding: 8px 15px;
        margin: 3px;
    }

    .modal-content {
        width: 90%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .stat-item:nth-child(n+7) {
        grid-column: span 1;
    }

    .league-container button {
        width: 100%;
        margin: 2px 0;
    }

    .standings td:nth-child(2)::after {
        font-size: 0.6em;
    }

    .title-item, .event-item {
        font-size: 0.8em;
        padding: 8px;
    }
}

.standings {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-container {
    min-width: 300px;
    height: 250px;
}

.dashboard h1 {
    font-size: 1.5em;
    margin: 0 0 15px 0;
}

.event-history {
    order: -1;
}

.site-footer {
    background-color: #2a2a2a;
    padding: 15px 20px;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-top: 1px solid #3a3a3a;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.footer-content span {
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
}

.calc-icon {
    width: 30px;
    height: 30px;
    filter: invert(100%); /* Transforma preto em branco */
    transition: transform 0.3s ease;
}

.calc-icon:hover {
    transform: rotate(360deg);
}

@media (max-width: 768px) {
    .footer-content {
        gap: 10px;
        padding: 0 10px;
    }
    
    .footer-content span {
        font-size: 0.8em;
    }
    
    .calc-icon {
        width: 25px;
        height: 25px;
    }
}

.worldcup-stage {
    padding: 10px;
    margin: 10px 0;
    background: #002f6c;
    border-radius: 5px;
  }
  
  .worldcup-progress {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
  }
  
  .worldcup-stat {
    text-align: center;
    padding: 10px;
    background: #001848;
    border-radius: 5px;
  }

  .choice-button[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
.stat-item h4 {
    font-size: 70%;
    margin: 0 0 10px 0;
    color: #ffffff;
    
 }
 .stat-item h5 {
    font-size: 100%;
    margin: 0 0 10px 0;
    color: #FFD700;
 }
.country-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
  }
  
  .country-buttons button {
    padding: 15px;
    font-size: 1.1em;
    background: #2196F3;
  }
  
  #team-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
  }

  /* Estilos específicos para o modal de inicialização */
.init-content {
    background: #1a1a2e;
    max-width: 600px;
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid #4CAF50;
}

.country-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.team-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 0;
}

.init-content button {
    background: #2196F3;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.init-content button:hover {
    background: #1976D2;
    transform: scale(1.05);
}