* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #1a1025 0%, #0b0711 100%);
    color: #f3f0f5;
    padding: 20px;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1100px;
}

@media (min-width: 850px) {
    .container {
        grid-template-columns: 2fr 1fr;
    }
}

.game-card {
    background: rgba(25, 18, 36, 0.75);
    border: 2px solid #8a2be2;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.15);
    backdrop-filter: blur(4px);
    text-align: center;
}

h1, h2, h3 {
    margin-top: 0;
    background: linear-gradient(45deg, #ff007f, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

h1 { font-size: 2.2rem; margin-bottom: 5px; }
h2 { font-size: 1.4rem; margin: 20px 0 15px 0; border-bottom: 1px solid #3d245c; padding-bottom: 5px; }
h3 { font-size: 1.1rem; margin: 0; }

.instruction {
    margin-bottom: 15px;
    color: #b3a7c2;
    font-size: 0.9rem;
}

.character {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
}

#head {
    width: 220px;
    max-width: 90%;
    cursor: pointer;
    user-select: none;
    filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.3));
    transition: transform 0.08s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#head:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 0 20px rgba(255, 0, 128, 0.5));
}

.currency-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 15px 0;
}

#contador {
    margin: 0;
    font-size: 26px;
    font-weight: bold;
    color: #ff007f;
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.4);
}

#dinheiro {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
}

/* BOTÃO DE CORTAR */
.btn-action {
    width: 100%;
    max-width: 400px;
    padding: 14px;
    margin: 0 auto 15px auto;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #00ffcc, #00b3ff);
    color: #0b0711;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.3);
    display: block;
    transition: transform 0.1s, filter 0.2s, box-shadow 0.2s;
}

.btn-action:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(0, 255, 204, 0.5);
    filter: brightness(1.1);
}

.btn-action:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-action:disabled {
    background: #201a2b !important;
    color: #554a63 !important;
    border: 1px solid #2d223d;
    box-shadow: none !important;
    cursor: not-allowed;
    filter: none !important;
    transform: none !important;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

#poderClique, #fiosPorSegundo {
    margin: 0;
    font-size: 13px;
    color: #a295b5;
    letter-spacing: 0.5px;
}

/* SEÇÃO DE LOJA */
.upgrades-section {
    text-align: left;
}

.upgrade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #130a1c;
    border: 1px solid #441c6e;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.upgrade-item:hover {
    border-color: #ff007f;
}

.upgrade-info {
    display: flex;
    flex-direction: column;
}

.upgrade-title {
    font-weight: bold;
    color: #f3f0f5;
    font-size: 0.95rem;
}

.upgrade-desc {
    font-size: 0.8rem;
    color: #a295b5;
}

.btn-shop {
    width: auto;
    padding: 8px 16px;
    font-size: 0.85rem;
    background: linear-gradient(45deg, #4b1487, #b5005a);
}

.btn-shop:disabled {
    background: #251b30;
    color: #635673;
    border: 1px solid #382847;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
}

/* BARRA LATERAL DA IA */
.chat-sidebar {
    background: rgba(18, 11, 28, 0.85);
    border: 1px solid #5a1e99;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: fit-content;
}

.chat-header {
    background: #170d26;
    padding: 15px;
    border-bottom: 1px solid #3d245c;
}

.chat-body {
    padding: 15px;
}

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: #b3a7c2;
    font-size: 0.85rem;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 10px;
    background: #0d0614;
    border: 1px solid #3d245c;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

.input-group textarea {
    height: 70px;
    resize: none;
}

.input-group input:focus, .input-group textarea:focus {
    outline: none;
    border-color: #ff007f;
}

/* NOVO: Caixa de Resposta da IA */
.ia-response-box {
    margin-top: 15px;
    padding: 12px;
    background: #09040e;
    border: 1px dashed #5a1e99;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #b3a7c2;
    line-height: 1.4;
    min-height: 60px;
    word-break: break-word;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #8a2be2, #ff007f);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 0, 128, 0.2);
    transition: transform 0.1s, filter 0.2s, box-shadow 0.2s;
}

button:hover:not(:disabled) {
    filter: brightness(1.2);
    box-shadow: 0 4px 15px rgba(255, 0, 128, 0.4);
}

button:active:not(:disabled) {
    transform: scale(0.98);
}
