/**
 * JOGO DA TABUADA V2 - DESIGN MODERNO
 * Design responsivo, gamificado e otimizado para SEO
 * Data: 23/01/2026
 */

/* ===================================
   GAME INTRO SECTION
   =================================== */
.game-intro-section {
    margin-bottom: 24px;
}

.game-main-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: var(--font-primary);
    line-height: 1.2;
}

.game-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.game-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.badge-category {
    background: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
    color: white;
}

.badge-difficulty {
    background: linear-gradient(135deg, #5DADE2 0%, #7EC8E3 100%);
    color: white;
}

.badge-age {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    color: white;
}

/* ===================================
   GAME CONTAINER
   =================================== */
.game-container {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFF8F0 100%);
    border-radius: 32px;
    padding: 32px;
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '📊';
    position: absolute;
    top: -40px;
    right: -40px;
    font-size: 200px;
    opacity: 0.05;
    pointer-events: none;
}

/* Botão Tela Cheia */
.btn-fullscreen {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: white;
    border: 3px solid #5DADE2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.3);
    z-index: 100;
}

.btn-fullscreen:hover {
    transform: scale(1.1) rotate(5deg);
    background: #5DADE2;
    box-shadow: 0 6px 20px rgba(93, 173, 226, 0.5);
}

.btn-fullscreen:hover svg {
    stroke: white;
}

/* Modo Tela Cheia */
.game-container:fullscreen {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFF8F0 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

.game-container:-webkit-full-screen {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFF8F0 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

.game-container:-moz-full-screen {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFF8F0 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

.game-container:-ms-fullscreen {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFF8F0 100%);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

/* ===================================
   WELCOME SCREEN
   =================================== */
.welcome-screen {
    text-align: center;
    padding: 40px 24px;
}

.welcome-icon {
    font-size: 120px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.welcome-title {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    font-family: 'Fredoka', cursive;
}

.welcome-text {
    font-size: 18px;
    color: #5A5A5A;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-start {
    background: linear-gradient(135deg, #5DADE2 0%, #7EC8E3 100%);
    color: white;
    border: none;
    padding: 20px 48px;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 24px rgba(93, 173, 226, 0.4);
    font-family: 'Fredoka', cursive;
    margin-bottom: 32px;
}

.btn-start:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 32px rgba(93, 173, 226, 0.6);
}

.game-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-icon {
    font-size: 24px;
}

.info-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

/* ===================================
   GAME PLAY
   =================================== */
.game-play-header {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.game-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 16px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #5DADE2;
    font-family: 'Fredoka', cursive;
}

.game-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
}

/* ===================================
   TABUADA AREA
   =================================== */
.tabuada-area {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tabuada-title {
    font-size: 28px;
    font-weight: 700;
    color: #FF8C42;
    text-align: center;
    margin-bottom: 24px;
    font-family: 'Fredoka', cursive;
}

.tabuada-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F8F9FA;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 300ms;
}

.input-row:hover {
    background: #E9ECEF;
    transform: translateX(5px);
}

.input-row.correct {
    background: #D4EDDA;
    border: 2px solid #28A745;
}

.input-row.wrong {
    background: #F8D7DA;
    border: 2px solid #DC3545;
}

.input-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    font-family: 'Poppins', sans-serif;
    min-width: 80px;
}

.input-answer {
    width: 80px;
    padding: 8px 12px;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #DEE2E6;
    border-radius: 8px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    transition: all 300ms;
}

.input-answer:focus {
    outline: none;
    border-color: #5DADE2;
    box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.2);
}

.input-answer.correct {
    border-color: #28A745;
    background: white;
}

.input-answer.wrong {
    border-color: #DC3545;
    background: white;
}

.btn-verify,
.btn-restart {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 300ms;
    font-family: 'Fredoka', cursive;
    margin-top: 8px;
}

.btn-verify {
    background: linear-gradient(135deg, #28A745 0%, #4CAF50 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.3);
}

.btn-verify:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-restart {
    background: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 140, 66, 0.3);
}

.btn-restart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

/* ===================================
   RESULTS AREA
   =================================== */
.results-area {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    max-height: 600px;
    overflow-y: auto;
}

.results-title {
    font-size: 22px;
    font-weight: 700;
    color: #5DADE2;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Fredoka', cursive;
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.results-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

.result-item {
    background: #F8F9FA;
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid #5DADE2;
}

.result-item.perfect {
    border-left-color: #28A745;
    background: #D4EDDA;
}

.result-item.has-errors {
    border-left-color: #FFC107;
    background: #FFF3CD;
}

.result-item.many-errors {
    border-left-color: #DC3545;
    background: #F8D7DA;
}

.result-header {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Fredoka', cursive;
}

.result-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #666;
    font-family: 'Poppins', sans-serif;
}

.result-detail {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===================================
   COMPLETION SCREEN
   =================================== */
.completion-screen {
    text-align: center;
    padding: 40px 24px;
}

.completion-icon {
    font-size: 120px;
    margin-bottom: 24px;
    animation: celebrate 1s ease-in-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    75% { transform: scale(1.2) rotate(-10deg); }
}

.completion-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    font-family: 'Fredoka', cursive;
}

.completion-message {
    font-size: 20px;
    color: #5A5A5A;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 40px;
}

.final-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.final-stat {
    background: white;
    border-radius: 20px;
    padding: 24px 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.final-stat-value {
    font-size: 48px;
    font-weight: 700;
    color: #5DADE2;
    font-family: 'Fredoka', cursive;
    margin-bottom: 8px;
}

.final-stat-label {
    font-size: 16px;
    color: #666;
    font-family: 'Poppins', sans-serif;
}

.btn-again {
    background: linear-gradient(135deg, #5DADE2 0%, #7EC8E3 100%);
    color: white;
    border: none;
    padding: 20px 48px;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 24px rgba(93, 173, 226, 0.4);
    font-family: 'Fredoka', cursive;
}

.btn-again:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 32px rgba(93, 173, 226, 0.6);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 992px) {
    .game-content-wrapper {
        grid-template-columns: 1fr;
    }

    .results-area {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }

    .btn-fullscreen {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }

    .game-main-title {
        font-size: 28px;
    }

    .game-badges {
        gap: 8px;
    }

    .game-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .welcome-icon {
        font-size: 80px;
    }

    .welcome-title {
        font-size: 32px;
    }

    .welcome-text {
        font-size: 16px;
    }

    .btn-start {
        padding: 16px 32px;
        font-size: 20px;
    }

    .game-info {
        flex-direction: column;
        align-items: stretch;
    }

    .tabuada-inputs {
        grid-template-columns: 1fr;
    }

    .completion-title {
        font-size: 36px;
    }

    .completion-message {
        font-size: 18px;
    }

    .final-stats {
        gap: 16px;
    }

    .final-stat {
        padding: 20px 24px;
        min-width: 120px;
    }

    .final-stat-value {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 16px;
    }

    .game-stats {
        gap: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .tabuada-title {
        font-size: 24px;
    }

    .input-label {
        font-size: 16px;
        min-width: 70px;
    }

    .input-answer {
        width: 70px;
        font-size: 16px;
    }

    .btn-verify,
    .btn-restart {
        font-size: 16px;
        padding: 14px;
    }

    .final-stats {
        flex-direction: column;
    }

    .btn-again {
        padding: 16px 32px;
        font-size: 20px;
    }
}

/* ===================================
   SCROLLBAR CUSTOMIZATION
   =================================== */
.results-area::-webkit-scrollbar {
    width: 8px;
}

.results-area::-webkit-scrollbar-track {
    background: #F1F1F1;
    border-radius: 10px;
}

.results-area::-webkit-scrollbar-thumb {
    background: #5DADE2;
    border-radius: 10px;
}

.results-area::-webkit-scrollbar-thumb:hover {
    background: #4A9DD1;
}
