/**
 * JOGO DA MULTIPLICAÇÃO V2 - DESIGN MODERNO
 * Design colorido, gamificado e mobile-friendly
 * Data: 22/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 CONTAINER
   =================================== */
.game-container {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFF5F8 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;
}

.btn-fullscreen svg {
    transition: all 300ms;
}

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

/* Fullscreen - Level Selection otimizado para mobile */
.game-container:fullscreen .level-selection,
.game-container:-webkit-full-screen .level-selection,
.game-container:-moz-full-screen .level-selection,
.game-container:-ms-fullscreen .level-selection {
    padding: 16px 8px;
    height: auto;
}

.game-container:fullscreen .level-title,
.game-container:-webkit-full-screen .level-title,
.game-container:-moz-full-screen .level-title,
.game-container:-ms-fullscreen .level-title {
    font-size: 32px;
    margin-bottom: 12px;
}

.game-container:fullscreen .level-subtitle,
.game-container:-webkit-full-screen .level-subtitle,
.game-container:-moz-full-screen .level-subtitle,
.game-container:-ms-fullscreen .level-subtitle {
    font-size: 16px;
    margin-bottom: 24px;
}

.game-container:fullscreen .level-cards,
.game-container:-webkit-full-screen .level-cards,
.game-container:-moz-full-screen .level-cards,
.game-container:-ms-fullscreen .level-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
}

.game-container:fullscreen .level-card,
.game-container:-webkit-full-screen .level-card,
.game-container:-moz-full-screen .level-card,
.game-container:-ms-fullscreen .level-card {
    padding: 24px 20px;
    margin: 0;
}

.game-container:fullscreen .level-icon,
.game-container:-webkit-full-screen .level-icon,
.game-container:-moz-full-screen .level-icon,
.game-container:-ms-fullscreen .level-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

/* ===================================
   LEVEL SELECTION
   =================================== */
.level-selection {
    text-align: center;
    padding: 24px;
}

.level-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;
    animation: rainbow 3s infinite;
}

.level-subtitle {
    font-size: 18px;
    color: #5A5A5A;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 48px;
}

.level-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 0 auto;
    max-width: 900px;
}

.level-card {
    background: white;
    border-radius: 24px;
    padding: 32px 24px;
    cursor: pointer;
    transition: all 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.level-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #5DADE2 0%, #FF69B4 100%);
    opacity: 0;
    transition: opacity 300ms;
}

.level-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 16px 48px rgba(93, 173, 226, 0.3);
    border-color: #5DADE2;
}

.level-card:hover::before {
    opacity: 0.05;
}

.level-card:nth-child(1):hover {
    border-color: #A8E6A1;
    box-shadow: 0 16px 48px rgba(168, 230, 161, 0.3);
}

.level-card:nth-child(2):hover {
    border-color: #FFD700;
    box-shadow: 0 16px 48px rgba(255, 215, 0, 0.3);
}

.level-card:nth-child(3):hover {
    border-color: #FF8C42;
    box-shadow: 0 16px 48px rgba(255, 140, 66, 0.3);
}

.level-icon {
    font-size: 72px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.level-card:nth-child(2) .level-icon {
    animation-delay: -1s;
}

.level-card:nth-child(3) .level-icon {
    animation-delay: -2s;
}

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

.level-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 8px;
}

.level-card p {
    font-size: 16px;
    color: #5A5A5A;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.level-info {
    background: linear-gradient(135deg, #F0F8FF 0%, #FFF5F8 100%);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #5DADE2;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.level-time {
    font-size: 14px;
    color: #5A5A5A;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

/* ===================================
   GAME PLAY
   =================================== */
.game-play {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.game-play-header {
    margin-bottom: 32px;
}

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

.stat-item {
    background: white;
    padding: 16px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 3px solid transparent;
    transition: all 300ms;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(93, 173, 226, 0.2);
}

.stat-item:nth-child(1) {
    border-color: #5DADE2;
}

.stat-item:nth-child(2) {
    border-color: #FFD700;
}

.stat-item:nth-child(3) {
    border-color: #A8E6A1;
}

.stat-item:nth-child(4) {
    border-color: #FF69B4;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #5A5A5A;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #2C3E50;
}

/* ===================================
   TIME BAR
   =================================== */
.time-bar-container {
    background: white;
    height: 60px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 3px solid #5DADE2;
}

.time-bar {
    height: 100%;
    background: linear-gradient(90deg, #A8E6A1 0%, #FFD700 50%, #FF8C42 100%);
    transition: width 1s linear;
    position: relative;
}

.time-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.time-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
    color: #2C3E50;
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
    z-index: 2;
}

/* ===================================
   QUESTION AREA
   =================================== */
.question-area {
    text-align: center;
    padding: 48px 24px;
}

.question-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.number {
    font-size: 96px;
    font-weight: 700;
    color: #5DADE2;
    text-shadow: 3px 3px 0 rgba(93, 173, 226, 0.2);
    animation: bounce 1s ease-in-out infinite;
}

.number:nth-child(3) {
    animation-delay: -0.5s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.operator,
.equals {
    font-size: 72px;
    font-weight: 700;
    color: #FF69B4;
}

.answer-input {
    font-size: 96px;
    font-weight: 700;
    width: 280px;
    text-align: center;
    border: 5px solid #FFD700;
    border-radius: 24px;
    padding: 16px;
    background: white;
    color: #2C3E50;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
    transition: all 300ms;
}

.answer-input:focus {
    outline: none;
    border-color: #5DADE2;
    box-shadow: 0 12px 32px rgba(93, 173, 226, 0.4);
    transform: scale(1.05);
}

.answer-input::placeholder {
    color: #E0E0E0;
}

/* ===================================
   FEEDBACK
   =================================== */
.feedback {
    font-size: 32px;
    font-weight: 700;
    min-height: 50px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback.correct {
    color: #A8E6A1;
}

.feedback.wrong {
    color: #FF69B4;
}

/* ===================================
   COMBO SYSTEM
   =================================== */
.combo-container {
    text-align: center;
    margin: 24px 0;
    animation: comboAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes comboAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.combo-text {
    display: inline-block;
    background: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
    padding: 16px 32px;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.4);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.combo-number {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-right: 12px;
}

.combo-label {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

/* ===================================
   ACTION BUTTONS
   =================================== */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.btn-action {
    padding: 16px 32px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Fredoka', cursive;
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.btn-action:active {
    transform: translateY(0);
}

.btn-check {
    background: linear-gradient(135deg, #A8E6A1 0%, #7BC96F 100%);
    color: white;
}

.btn-skip {
    background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
    color: white;
}

.btn-quit {
    background: linear-gradient(135deg, #FF69B4 0%, #FF85C1 100%);
    color: white;
}

/* ===================================
   RESULT SCREEN
   =================================== */
.result-screen {
    text-align: center;
    padding: 48px 24px;
    animation: zoomIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-icon {
    font-size: 120px;
    margin-bottom: 24px;
    animation: spin 0.8s ease-out;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #5DADE2 0%, #FF69B4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

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

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 32px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.result-stat {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #5DADE2;
    transition: all 300ms;
}

.result-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-stat:nth-child(1) {
    border-color: #5DADE2;
}

.result-stat:nth-child(2) {
    border-color: #A8E6A1;
}

.result-stat:nth-child(3) {
    border-color: #FFD700;
}

.result-stat:nth-child(4) {
    border-color: #FF69B4;
}

.result-stat-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.result-stat-label {
    font-size: 14px;
    color: #5A5A5A;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.result-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #2C3E50;
}

.result-medals {
    margin: 32px 0;
    font-size: 64px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.medal {
    animation: medalDrop 0.5s ease-out;
    animation-fill-mode: both;
}

.medal:nth-child(2) {
    animation-delay: 0.2s;
}

.medal:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes medalDrop {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.btn-result {
    padding: 16px 32px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Fredoka', cursive;
    color: white;
}

.btn-result:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.btn-again {
    background: linear-gradient(135deg, #5DADE2 0%, #7EC8E3 100%);
}

.btn-levels {
    background: linear-gradient(135deg, #FF8C42 0%, #FFD700 100%);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    
    .btn-fullscreen {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }
    
    .level-selection {
        padding: 16px 8px;
    }

    .level-title {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .level-subtitle {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .level-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 100%;
    }

    .level-card {
        padding: 24px 20px;
        max-width: 100%;
    }

    .level-icon {
        font-size: 56px;
        margin-bottom: 12px;
    }

    .level-card h3 {
        font-size: 24px;
    }

    .level-card p {
        font-size: 16px;
    }

    .level-info,
    .level-time {
        font-size: 14px;
    }
    
    .btn-fullscreen svg {
        width: 20px;
        height: 20px;
    }

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

    .level-subtitle {
        font-size: 16px;
    }

    .level-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .level-icon {
        font-size: 56px;
    }

    .level-card h3 {
        font-size: 24px;
    }

    .game-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

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

    .time-bar-container {
        height: 50px;
    }

    .time-text {
        font-size: 20px;
    }

    .question-box {
        gap: 12px;
    }

    .number {
        font-size: 56px;
    }

    .operator,
    .equals {
        font-size: 48px;
    }

    .answer-input {
        font-size: 56px;
        width: 200px;
        padding: 12px;
    }

    .feedback {
        font-size: 24px;
    }

    .combo-number {
        font-size: 32px;
    }

    .combo-label {
        font-size: 18px;
    }

    .btn-action,
    .btn-result {
        font-size: 16px;
        padding: 12px 24px;
        width: 100%;
    }

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

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

    .result-message {
        font-size: 16px;
    }

    .result-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .result-stat-value {
        font-size: 28px;
    }

    .result-medals {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .game-main-title {
        font-size: 28px;
    }

    .game-badges {
        gap: 8px;
    }

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

    .number {
        font-size: 42px;
    }

    .operator,
    .equals {
        font-size: 36px;
    }

    .answer-input {
        font-size: 42px;
        width: 150px;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   ANIMATIONS - SPECIAL EFFECTS
   =================================== */
@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.celebrate {
    animation: celebrate 0.6s;
}

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