/**
 * 🎨 components.css
 * Estilos específicos para los nuevos componentes
 */

/* ====================================
   MODO DE JUEGO TOGGLE
   ==================================== */

.game-mode-toggle {
    text-align: center;
    margin-top: 20px;
}

.toggle-container {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 4px;
    gap: 4px;
}

.mode-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.mode-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ====================================
   EXPLORADOR DE NÚMEROS
   ==================================== */

.number-explorer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.explorer-header {
    text-align: center;
    margin-bottom: 30px;
}

.explorer-header h2 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.explorer-subtitle {
    color: #666;
    font-size: 1.1em;
    margin: 0;
}

.explorer-input {
    text-align: center;
    margin-bottom: 30px;
}

.explorer-input label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

#numberInput {
    width: 200px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 25px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    padding: 0 20px;
    transition: all 0.3s ease;
}

#numberInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#numberInput.error {
    border-color: #f44336;
    animation: shake 0.5s;
}

#exploreBtn {
    height: 50px;
    padding: 0 30px;
    font-size: 1.1em;
}

.input-hints {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hint-chip {
    padding: 8px 15px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    color: #667eea;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.hint-chip:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

/* ====================================
   RESULTADOS DEL EXPLORADOR
   ==================================== */

.explorer-results {
    display: none;
    animation: slideIn 0.5s ease;
}

.number-analysis {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.number-analysis h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.analysis-details {
    display: grid;
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-item strong {
    min-width: 140px;
    color: #333;
}

.number-type {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.number-type.perfect-square {
    background: #e8f5e9;
    color: #2e7d32;
}

.number-type.perfect-cube {
    background: #fff3e0;
    color: #e65100;
}

.number-type.composite {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* ====================================
   MENSAJE DE NÚMERO INVÁLIDO
   ==================================== */

.invalid-number-message {
    text-align: center;
    padding: 40px;
    background: #fff3e0;
    border-radius: 15px;
    border: 2px solid #ff9800;
}

.invalid-number-message h3 {
    color: #e65100;
    margin-bottom: 20px;
}

.invalid-number-message p {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.invalid-number-message ul {
    text-align: left;
    display: inline-block;
    color: #666;
}

.invalid-number-message li {
    margin-bottom: 8px;
}

/* ====================================
   MENSAJES TEMPORALES
   ==================================== */

.temporary-message {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.temporary-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.temporary-message.info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #2196f3;
}

/* ====================================
   TRIÁNGULO DINÁMICO
   ==================================== */

#explorerPyramid::before {
    border-left-width: var(--triangle-left, 200px);
    border-right-width: var(--triangle-right, 200px);
    border-bottom-width: var(--triangle-bottom, 300px);
}

/* ====================================
   FOOTER CON CRÉDITOS - STICKY BOTTOM
   ==================================== */

.footer {
    flex-shrink: 0;
    padding: 25px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-credits {
    margin: 0 0 5px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1em;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.footer-credits strong {
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-license {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9em;
    font-weight: 300;
    letter-spacing: 0.3px;
}

/* ====================================
   RESPONSIVE PARA EXPLORADOR
   ==================================== */

@media (max-width: 768px) {
    .number-explorer {
        padding: 20px;
        margin-bottom: 20px;
    }

    .explorer-header h2 {
        font-size: 1.5em;
    }

    .explorer-subtitle {
        font-size: 1em;
    }

    .input-group {
        flex-direction: column;
        gap: 15px;
    }

    #numberInput {
        width: 100%;
        max-width: 250px;
    }

    .input-hints {
        gap: 8px;
    }

    .hint-chip {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .toggle-container {
        width: 100%;
        justify-content: center;
    }

    .mode-btn {
        flex: 1;
        max-width: 120px;
    }

    .analysis-details {
        grid-template-columns: 1fr;
    }

    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .detail-item strong {
        min-width: auto;
    }

    .main-content {
        padding: 15px;
        align-items: flex-start;
    }

    .footer {
        padding: 20px 0;
    }

    .footer-credits {
        font-size: 1em;
        margin-bottom: 3px;
    }

    .footer-license {
        font-size: 0.85em;
    }
}