/* Estilos específicos para Aula 07 - Desenvolvimento de Jogos */
@import url('../base.css');

/* ===== TEMA DA AULA - JOGOS ===== */
.hero {
    background: linear-gradient(135deg, #a29bfe 0%, #fd79a8 30%, #fdcb6e 70%, #e17055 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="3" fill="rgba(255,255,255,0.1)"><animate attributeName="opacity" values="0.1;0.3;0.1" dur="2s" repeatCount="indefinite"/></circle><circle cx="80" cy="30" r="2" fill="rgba(255,255,255,0.1)"><animate attributeName="opacity" values="0.1;0.4;0.1" dur="1.5s" repeatCount="indefinite"/></circle><circle cx="50" cy="60" r="4" fill="rgba(255,255,255,0.1)"><animate attributeName="opacity" values="0.1;0.2;0.1" dur="3s" repeatCount="indefinite"/></circle></svg>') repeat;
}

/* ===== BENEFÍCIOS DOS JOGOS ===== */
.game-benefits {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.benefit-icon {
    font-size: 2rem;
    min-width: 3rem;
    text-align: center;
}

.benefit-content strong {
    display: block;
    color: #2d3436;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.benefit-content p {
    margin: 0;
    color: #636e72;
    font-size: 0.9rem;
}

/* ===== TIPOS DE JOGOS ===== */
.game-types {
    margin: 2rem 0;
}

.game-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.game-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    transform: scale(1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite ease-in-out;
}

.game-card h6 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.game-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* ===== MÓDULO RANDOM ===== */
.random-explanation {
    margin: 2rem 0;
}

.analogy-box {
    background: linear-gradient(135deg, #ffe8cc, #ffd93d);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 2px solid #f39c12;
}

.analogy-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.analogy-icon {
    font-size: 3rem;
    animation: rotate 3s infinite linear;
}

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

.analogy-text strong {
    display: block;
    color: #e67e22;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.analogy-text p {
    margin: 0;
    color: #d35400;
    line-height: 1.6;
}

/* ===== FUNÇÕES RANDOM ===== */
.random-functions {
    margin: 2rem 0;
}

.function-showcase {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.function-demo {
    background: linear-gradient(135deg, #e8f4f8, #d1ecf1);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 5px solid #17a2b8;
    transition: transform 0.3s ease;
}

.function-demo:hover {
    transform: translateX(5px);
}

.function-demo h6 {
    color: #0c5460;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.function-demo p {
    color: #0c5460;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.demo-example {
    background: #495057;
    color: #f8f9fa;
    padding: 0.8rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid #6c757d;
}

/* ===== ESTRUTURA DE JOGO ===== */
.game-structure {
    margin: 2rem 0;
}

.component-flow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.component-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.component-step:hover {
    border-color: #6c5ce7;
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.15);
}

.step-number {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h6 {
    margin: 0 0 0.5rem 0;
    color: #2d3436;
    font-size: 1.1rem;
    font-weight: 600;
}

.step-content p {
    margin: 0.5rem 0;
    color: #636e72;
    line-height: 1.6;
}

.code-snippet {
    background: #2d3436;
    color: #00b894;
    padding: 0.8rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    border: 1px solid #636e72;
}

.component-arrow {
    text-align: center;
    font-size: 1.5rem;
    color: #6c5ce7;
    margin: 0.5rem 0;
}

/* ===== PADRÕES DE JOGOS ===== */
.game-patterns {
    margin: 2rem 0;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.pattern-item {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #fd79a8;
    transition: transform 0.3s ease;
}

.pattern-item:hover {
    transform: translateY(-3px);
}

.pattern-item strong {
    display: block;
    color: #d63031;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.pattern-item p {
    margin: 0;
    color: #e17055;
    font-size: 0.9rem;
}

/* ===== EVOLUÇÃO DO PROJETO ===== */
.project-evolution {
    margin: 2rem 0;
}

.evolution-steps {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.evolution-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 150px;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

.evolution-step:hover {
    border-color: #00cec9;
    transform: scale(1.05);
}

.step-badge {
    background: linear-gradient(135deg, #00cec9, #55a3ff);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-title {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.evolution-step p {
    margin: 0;
    color: #636e72;
    font-size: 0.8rem;
}

.evolution-arrow {
    font-size: 1.5rem;
    color: #00cec9;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== RECURSOS DO JOGO ===== */
.game-features {
    margin: 2rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border-radius: 8px;
    border: 2px solid #4caf50;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
}

.feature-icon {
    font-size: 1.5rem;
    color: #2e7d32;
}

.feature-text {
    color: #1b5e20;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== REGRAS DO JOGO ===== */
.game-rules {
    margin: 2rem 0;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid;
    transition: transform 0.3s ease;
}

.rule-item.win {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.rule-item:hover {
    transform: scale(1.02);
}

.rule-icon {
    font-size: 2rem;
}

.rule-text {
    flex: 1;
    font-weight: 600;
    color: #155724;
}

.rule-result {
    font-size: 1.5rem;
    color: #28a745;
}

/* ===== COMPARAÇÃO DE JOGOS ===== */
.challenge-comparison {
    margin: 2rem 0;
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

.comparison-header {
    display: contents;
}

.comparison-row {
    display: contents;
}

.comparison-col {
    background: white;
    padding: 1rem;
    text-align: center;
}

.comparison-header .comparison-col {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

.comparison-row .comparison-col:first-child {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* ===== DESAFIOS BÔNUS ===== */
.bonus-challenges {
    margin: 2rem 0;
}

.bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.bonus-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: 12px;
    border: 2px solid #ff9800;
    transition: all 0.3s ease;
}

.bonus-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

.bonus-icon {
    font-size: 2.5rem;
    color: #e65100;
    flex-shrink: 0;
}

.bonus-content strong {
    display: block;
    color: #bf360c;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.bonus-content p {
    margin: 0;
    color: #d84315;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== OBJETIVOS DE APRENDIZAGEM ===== */
.learning-objectives {
    margin: 2rem 0;
}

.objectives-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.objective-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-radius: 8px;
    border-left: 4px solid #9c27b0;
    transition: transform 0.3s ease;
}

.objective-item:hover {
    transform: translateX(5px);
}

.objective-icon {
    font-size: 1.5rem;
    color: #6a1b9a;
}

.objective-text {
    color: #4a148c;
    font-weight: 500;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .benefits-grid,
    .game-type-cards,
    .pattern-grid,
    .features-grid,
    .rules-grid,
    .bonus-grid {
        grid-template-columns: 1fr;
    }
    
    .evolution-steps {
        flex-direction: column;
        align-items: stretch;
    }
    
    .evolution-arrow {
        transform: rotate(90deg);
    }
    
    .comparison-table {
        grid-template-columns: 1fr;
    }
    
    .comparison-col {
        text-align: left;
    }
    
    .component-step {
        flex-direction: column;
        text-align: center;
    }
    
    .analogy-content {
        flex-direction: column;
        text-align: center;
    }
    
    .benefit-item,
    .bonus-item {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== ANIMAÇÕES ESPECIAIS ===== */
.lesson-part {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ESTILOS DE CÓDIGO ===== */
.code-example {
    border-left: 4px solid #6c5ce7;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.code-example pre {
    background: #2d3436;
    border: 2px solid #636e72;
}

.challenge-box {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    color: white;
}

.tip-box {
    background: linear-gradient(135deg, #00cec9, #55a3ff);
    color: white;
    border-left: 4px solid #0984e3;
}

.highlight-box {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    border: 2px solid #e17055;
    color: #d63031;
}