/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to right, #fbc2eb, #a6c1ee);
    color: #333;
    line-height: 1.6;
    padding: 10px;
}

/* HEADER */
header {
    background: #ff9a9e;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}
header h1, header h3 {
    color: #fff;
}
.config-btn, .share-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1.2em;
    margin: 5px;
    cursor: pointer;
}

/* CONTAINER PRINCIPAL */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px auto;
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* PAINÉIS DE INFORMAÇÃO */
.info-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}
.score-panel {
    flex: 1;
    border: 2px solid #ff9a9e;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(45deg, #FFCC00, #FF9900);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    color: #4d2600;
}
.score-panel h3 {
    font-size: 2em;
    margin-bottom: 10px;
}
.score-panel p {
    font-size: 1.6em;
    margin-bottom: 5px;
}
.actions-panel {
    flex: 1;
    padding: 20px;
    border: 2px solid #1d3557;
    border-radius: 10px;
    background: linear-gradient(45deg, #33CCFF, #0099CC);
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    color: #fff;
}
.actions-panel h3 {
    font-size: 2em;
    margin-bottom: 10px;
}
.actions-panel p {
    font-size: 1.6em;
    margin-bottom: 5px;
}
.bonus {
    background-color: #ff6b81;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}

/* ÁREA DAS GALINHAS */
.galinhas-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 20px;
}
.galinha {
    flex: 0 0 48%;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
    position: relative;
}
.galinha img {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
}
.galinha p {
    font-size: 1.8em;
    margin-bottom: 5px;
}
progress.health-progress {
    width: 100%;
    height: 30px;
    margin: 5px 0;
    appearance: none;
}
progress.health-progress::-webkit-progress-bar {
    background-color: #eee;
    border-radius: 10px;
}
progress.health-progress::-webkit-progress-value {
    background-color: #27ae60;
    border-radius: 10px;
    transition: width 0.5s ease;
}
.xp-bar.enemy {
    width: 100%;
    height: 10px;
    background: #ddd;
    border-radius: 4px;
    margin: 5px 0;
    overflow: hidden;
}
.xp-bar-fill {
    height: 100%;
    background: #3498db;
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* CONTROLES DE SOM */
.sound-controls {
    text-align: center;
    margin-bottom: 20px;
}
.sound-controls button {
    background: #ff9a9e;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    margin: 0 5px;
    transition: background 0.3s ease;
}
.sound-controls button:hover {
    background: #ff6b81;
}

/* BOTÕES DE AÇÃO */
.botoes {
    text-align: center;
    margin-bottom: 30px;
}
.botoes button {
    background: #ff9a9e;
    color: #fff;
    border: none;
    padding: 20px 40px;
    border-radius: 25px;
    font-size: 2em;
    cursor: pointer;
    transition: background 0.3s ease;
    margin: 10px;
}
.botoes button:hover {
    background: #ff6b81;
}

/* SEÇÃO DE DOAÇÃO */
.doar {
    background: linear-gradient(45deg, #fbc2eb, #a6c1ee);
    color: #fff;
    border: 2px dashed #fff;
    padding: 25px;
    border-radius: 8px;
    font-size: 1.6em;
    text-align: center;
    margin-bottom: 30px;
}
.doar a {
    color: #fff;
    text-decoration: underline;
}

/* BOTÃO DE INTRODUÇÃO */
.intro-btn {
    text-align: center;
    margin-bottom: 30px;
}
.intro-btn button {
    background: #1d3557;
    padding: 16px 32px;
    font-size: 2em;
}

/* MODAIS */
.modal {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s;
}
.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    position: relative;
}
.modal-content h2 {
    margin-bottom: 20px;
    font-size: 2em;
}
.modal-content p {
    font-size: 1.6em;
    margin-bottom: 15px;
}
.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 32px;
    color: #333;
    cursor: pointer;
}
.image-modal-content {
    background: none;
    padding: 0;
    border: none;
}
.image-modal-content img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 10px;
}

/* MODAL DE CONFIGURAÇÕES */
.config-modal-content {
    text-align: center;
}

/* MODAL DO MERCADOR/TAXADE */
.merchant-modal-content {
    text-align: center;
}
.merchant-modal-content img {
    max-width: 120px;
    display: block;
    margin: 0 auto 10px;
}

/* RANKING */
.ranking {
    margin: 20px 0;
    background: linear-gradient(135deg, #1d3557, #457b9d);
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.ranking h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 15px;
}
.ranking-table-wrapper {
    overflow-x: auto;
}
.ranking table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
    background: #f7f7f7;
    color: #333;
}
.ranking table, .ranking th, .ranking td {
    border: 1px solid #ccc;
}
.ranking th, .ranking td {
    padding: 12px;
    font-size: 1.2em;
    text-align: center;
}
.ranking tr:nth-child(even) {
    background: #eaeaea;
}

/* ANIMAÇÕES */
@keyframes pop {
  0% { transform: scale(0.9); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.shake {
    animation: shake 0.5s;
}
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}
.flash {
    animation: flash 0.5s;
}
@keyframes flash {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}
.hero-attack {
    animation: hero-attack 0.5s;
}
@keyframes hero-attack {
  0% { transform: translateX(0); }
  50% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

/* Feedback Floating Text */
.floating-feedback {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: red;
    font-size: 1.8em;
    font-weight: bold;
    pointer-events: none;
    z-index: 2000;
    display: none;
}
.animate-feedback {
    animation: floatUp 1s ease-out forwards;
}
@keyframes floatUp {
    from { opacity: 1; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, -50px); }
}

/* CONTROLE DE VOLUME */
.volume-control {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
}

/* RESPONSIVO - Mobile */
@media (max-width: 600px) and (orientation: portrait) {
    header h1, header h3 {
        font-size: 2.2em;
    }
    .info-container {
        flex-direction: column;
    }
    .score-panel, .actions-panel {
        width: 100%;
    }
    .score-panel h3, .actions-panel h3 {
        font-size: 2.2em;
    }
    .score-panel p, .actions-panel p {
        font-size: 1.8em;
    }
    .galinhas-container {
        flex-direction: column;
        align-items: center;
    }
    .galinha {
        width: 100%;
    }
    .galinha img {
        width: 240px;
        height: 240px;
    }
    .galinha p {
        font-size: 1.8em;
    }
    progress.health-progress {
        height: 30px;
    }
    .botoes button {
        font-size: 2em;
        padding: 20px 40px;
    }
    .modal-content {
        max-width: 100%;
        padding: 40px;
        font-size: 1.8em;
    }
    .merchant-modal-content {
        font-size: 1.8em;
        padding: 40px;
    }
    .ranking table, .ranking th, .ranking td {
        font-size: 1.4em;
    }
}
