/* moneda.css - Estilos para el lanzador de moneda virtual */
/* Versión completa optimizada para móviles */

/* Contenedor principal de la moneda */
.coin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    min-height: 300px;
}

.coin-display {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px 0;
    perspective: 1000px;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-out;
    cursor: pointer;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 4px solid var(--primary-color);
}

.coin-heads {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #1a1a1a;
    transform: rotateY(0deg);
}

.coin-tails {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: #1a1a1a;
    transform: rotateY(180deg);
}

.coin.flipping {
    animation: coin-flip 2s ease-in-out;
}

.coin.show-heads {
    transform: rotateY(0deg);
}

.coin.show-tails {
    transform: rotateY(180deg);
}

@keyframes coin-flip {
    0% { transform: rotateY(0deg); }
    25% { transform: rotateY(90deg); }
    50% { transform: rotateY(180deg); }
    75% { transform: rotateY(270deg); }
    100% { transform: rotateY(360deg); }
}

/* Controles de lanzamiento */
.flip-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.flip-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    min-width: 200px;
}

.flip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.flip-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Estadísticas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 30px 0;
    width: 100%;
    max-width: 400px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--light-color);
    opacity: 0.8;
}

.stat-label span {
    color: #ffffff;
    font-weight: bold;
    opacity: 1;
}

/* Historial de lanzamientos */
.history-container {
    margin-top: 30px;
    width: 100%;
    max-width: 400px;
}

.history-title {
    text-align: center;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 1.1rem;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-height: 100px;
    overflow-y: auto;
}

.history-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.history-item.heads {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #1a1a1a;
}

.history-item.tails {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: #1a1a1a;
}

/* Resultado del lanzamiento */
.result-display {
    text-align: center;
    margin: 20px 0;
    min-height: 60px;
}

.result-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-text.show {
    opacity: 1;
}

/* Configuración adicional */
.settings-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.settings-title {
    text-align: center;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 1.1rem;
}

.setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(26px);
}

/* Responsive */
@media (max-width: 480px) {
    .coin-display {
        width: 150px;
        height: 150px;
    }

    .coin-face {
        font-size: 2.5rem;
    }

    .flip-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
        min-width: 180px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* Responsive general para móviles */
@media (max-width: 768px) {
    .container {
        margin: 0;
    }
}