/* ========== IA GUESS GAME - CSS ========== */

* {
    box-sizing: border-box;
}

.igg-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #333;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-height: 500px;
    color: #333;
}

/* ========== LOADING ========== */
.igg-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    background: white;
    border-radius: 8px;
    font-size: 18px;
    color: #000;
    font-weight: bold;
}

.igg-loading p::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ========== ERRO ========== */
.igg-error {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.igg-error p {
    color: #e74c3c;
    font-size: 16px;
    margin-bottom: 20px;
}

.igg-error button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.igg-error button:hover {
    background: #c0392b;
}

/* ========== JOGO EM PROGRESSO ========== */
.igg-game {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Header */
.igg-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
    color: #000;
}

.igg-header h2 {
    margin: 0 0 10px 0;
    color: #000;
    font-size: 28px;
}

.descricao {
    color: #666;
    font-size: 14px;
    width: 50%;
    margin: 0 auto;
}

.igg-round {
    color: #333;
    font-size: 14px;
    margin: 0;
}

/* Personagens */
.igg-characters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.igg-character {
    border: 3px solid #ecf0f1;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.igg-character:hover {
    border-color: #333;
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.2);
}

.igg-character.igg-selected {
    border-color: #333;
    background: #f0f3ff;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.igg-character img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #ddd;
}

.igg-character p {
    margin: 10px 0 0 0;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

/* Área de pergunta */
.igg-question-area {
    margin-bottom: 30px;
}

.igg-textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
    color: #000;
}

.igg-textarea:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    color: #000;
}

.igg-textarea::placeholder {
    color: #bdc3c7;
}

.igg-btn-ask {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #000 !important;
    color: #FFF  !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    height: auto;           /* ← ADICIONE ISTO */
    line-height: 1.5;       /* ← ADICIONE ISTO */
    min-height: 44px;       /* ← ADICIONE ISTO (acessibilidade mobile) */
}


.igg-btn-ask:hover:not(:disabled) {
    background: #bdc3c7 !important;
  	color: #000 !important;
}

.igg-btn-ask:disabled {
    background: #bdc3c7 !important;
 	color: #000 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Respostas */
.igg-answers {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    /*border-left: 4px solid #667eea;*/
}

.igg-answers h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.igg-answer {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ecf0f1;
}

.igg-answer strong {
    color: #000;
    display: block;
    margin-bottom: 5px;
}

.igg-answer p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    font-size: 14px;
}

/* Botões de ação */
.igg-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.igg-btn-eliminate,
.igg-btn-guess {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: -20px;
  	background: #000 !important;
  	color: #FFF !important;
}

.igg-btn-eliminate {
    background: #333;
    color: white;
}

.igg-btn-eliminate:hover:not(:disabled) {
    background: #bdc3c7 !important;
  	color: #FFF;
}

.igg-btn-guess {
    background: #333;
    color: white;
}

.igg-btn-guess:hover:not(:disabled) {
    background: #bdc3c7;
}

.igg-btn-eliminate:disabled,
.igg-btn-guess:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========== RESULTADO ========== */
.igg-result {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.igg-result-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.igg-acertou {
    color: #27ae60;
}

.igg-errou {
    color: #e74c3c;
}

.igg-result-correct {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 30px;
    background: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
}

/* Histórias */
.igg-stories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.igg-stories img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #ddd;
}

.igg-story {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ecf0f1;
    text-align: left;
}

.igg-story h4 {
    color: #000;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.igg-story p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.igg-story-correct {
    background: #d4edda;
    color: #155724;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 10px !important;
}

.igg-story-fake {
    background: #f8d7da;
    color: #721c24;
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 10px !important;
}

.igg-btn-restart {
    background: #333;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin: 30px;
}

.igg-btn-restart:hover {
    background: #000;
    transform: scale(1.05);
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .igg-container {
        padding: 15px;
    }

    .igg-game,
    .igg-result,
    .igg-error {
        padding: 20px;
    }

    .igg-header h2 {
        font-size: 24px;
    }
  
  .descricao {
    width: 75%;
  }


    .igg-characters {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .igg-character img {
        width: 70px;
        height: 70px;
    }

    .igg-textarea {
        min-height: 80px;
    }

    .igg-actions {
        grid-template-columns: 1fr;
    }

    .igg-stories {
        grid-template-columns: 1fr;
    }

    .igg-result {
        padding: 20px;
    }

    .igg-result-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .igg-container {
        padding: 10px;
        border-radius: 8px;
    }

    .igg-game,
    .igg-result {
        padding: 15px;
    }

    .igg-header h2 {
        font-size: 20px;
    }
  
  .descricao {
	width: 100%;
  }

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

    .igg-character {
        padding: 10px;
    }

    .igg-character img {
        width: 60px;
        height: 60px;
    }
}

.igg-round {
    color: #333;
    font-size: 14px;
    margin: 10px 0 0 0;
    font-weight: 600;
    opacity: 1 !important;    /* força visibilidade */
}

.igg-round strong {
    color: #333;
    font-size: 16px;
}

.igg-round span {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

/*.igg-stats-ranking span {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin: 0px 0;
    padding: 15px;
    background: #000;
    border-radius: 8px;
}*/

.igg-stats-ranking {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.igg-stats-ranking span {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 8px;
    background: #999;
    border-radius: 4px;
}

.igg-stats-ranking {
    margin: 0;
    font-size: 12px;
}

.igg-count {
    color: #fff;
}

/* ========== RANKING BOXES ========== */
.igg-ranking-box {
    background: #000;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.igg-ranking-title {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #f0f0f0;
    font-size: 1.5em;
    color: #fff;
    text-align: center;
}

.igg-ranking-empty,
.igg-info,
.igg-error {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin: 10px 0;
}

.igg-ranking-empty {
    background: #000;
    color: #6c757d;
}

.igg-info {
    background: #000;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.igg-error {
    background: #000;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========== TABELA DE RANKING ========== */
.igg-ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.igg-ranking-table thead {
    background: #333;
    color: white;
}

.igg-ranking-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
}

.igg-ranking-table th.rank-pos {
    width: 60px;
    text-align: center;
}

.igg-ranking-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.igg-ranking-table tbody tr:hover {
    background: #666;
}

.igg-ranking-table tbody tr.highlight {
    background: #000;
    font-weight: 600;
}

.igg-ranking-table tbody tr.highlight:hover {
    background: #666;
}

.igg-ranking-table td {
    padding: 12px 10px;
    vertical-align: middle;
}

.igg-ranking-table .rank-pos {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
}

.igg-ranking-table .rank-player {
    font-weight: 600;
    color: #fff;
}

.you-badge {
    display: inline-block;
    background: #999;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    margin-left: 8px;
    font-weight: bold;
}

.igg-ranking-table .rank-questions strong {
    color: #FFD700;
}

.igg-ranking-table .rank-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #27ae60;
}

.igg-ranking-table .rank-date {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .igg-ranking-box {
        padding: 15px;
    }

    .igg-ranking-table {
        font-size: 0.85em;
    }

    .igg-ranking-table th,
    .igg-ranking-table td {
        padding: 8px 5px;
    }

    .igg-ranking-title {
        font-size: 1.2em;
    }
}

