/* ===================================
   MAESTRO SIMULATOR - ACCESS CONTROL CSS
   Estilos para tela de seleção e modal
   =================================== */

/* Container Principal do App */
#maestro-simulator-app {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Telas (apenas uma visível por vez) */
.screen {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* Welcome Header (topo da tela de seleção) */
.welcome-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.welcome-header h2 {
    font-size: 2rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.welcome-text {
    font-size: 1.2rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    margin: 10px 0;
    opacity: 0.95;
}

.cost-info {
    font-size: 1rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    margin: 10px 0 0 0;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    display: inline-block;
}

/* Grid de Ferramentas */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Card da Ferramenta */
.tool-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.tool-card.unlocked {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    border-color: #10b981;
}

/* Emoji e Descrição */
.tool-emoji {
    font-size: 5rem;
    margin: 10px 0 20px 0;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.tool-name {
    font-size: 1.8rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    font-weight: bold;
    color: #333;
    margin: 15px 0;
}

.tool-description {
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    color: #666;
    line-height: 1.6;
    margin: 15px 0;
    padding: 0 10px;
}

/* Status Badges */
.tool-status {
    margin: 20px 0 10px 0;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
}

.status-badge.locked {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.status-badge.unlocked {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.unlock-timer {
    margin-top: 10px;
    font-size: 0.85rem;
    font-family: 'Arial', sans-serif;
    color: #10b981;
    font-weight: bold;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 20px;
}

#game-title {
    margin: 0;
    font-size: 1.8rem;
    font-family: 'Press Start 2P', monospace;
    flex: 1;
    text-align: center;
}

.timer-display {
    font-size: 1rem;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 10px;
}

.btn-back {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

/* Loading Screen */
.loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 400px;
}

.loading-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulse-loading 1.5s infinite;
}

@keyframes pulse-loading {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.loading-text {
    font-size: 1.5rem;
    font-family: 'Press Start 2P', monospace;
    margin-bottom: 20px;
}

.loading-progress {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 0.9rem;
    font-family: 'Arial', sans-serif;
    opacity: 0.8;
}

/* Disclaimer */
.disclaimer {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border-radius: 10px;
    margin: 20px 0;
    color: #f57c00;
    border: 2px solid rgba(255, 193, 7, 0.3);
    font-size: 0.95rem;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

.disclaimer strong {
    color: #e65100;
}

.control-mobile {
    display: none;
}

/* Ferramentas Relacionadas */
.related-tools {
    margin-top: 40px;
}

.related-tools h3 {
    text-align: center;
    font-size: 1.5rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    color: #333;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.related-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.related-emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.related-name {
    font-size: 1.1rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.related-desc {
    font-size: 0.85rem;
    font-family: 'Arial', sans-serif;
    color: #666;
}

/* Modal de Confirmação */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-family: 'Arial', sans-serif;
    color: #555;
    line-height: 1.6;
}

.modal-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 15px;
    padding: 20px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
}

.info-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.info-text {
    color: #555;
}

.info-text strong {
    color: #667eea;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-modal {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: #e0e0e0;
    color: #555;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    #maestro-simulator-app {
        padding: 10px;
    }

    .welcome-header h2 {
        font-size: 1.5rem;
    }

    .welcome-text {
        font-size: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-emoji {
        font-size: 4rem;
    }

    .tool-name {
        font-size: 1.5rem;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
    }

    #game-title {
        font-size: 1.3rem;
    }

    .control-desktop {
        display: none;
    }

    .control-mobile {
        display: inline;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .btn-modal {
        width: 100%;
    }
}

/* Acessibilidade */
.tool-card:focus,
.btn-back:focus,
.btn-modal:focus {
    outline: 3px solid #667eea;
    outline-offset: 4px;
}
