/* ============================================================
   HubJeu — Styles globaux (complémentaires à Tailwind)
   ============================================================ */

/* Reset scroll smooth */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

/* Empêcher le zoom sur double-tap mobile */
* {
    touch-action: manipulation;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(233, 69, 96, 0.3); }
    50%      { box-shadow: 0 0 40px rgba(233, 69, 96, 0.6); }
}

@keyframes slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes bounce-in {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.05); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes confetti-fall {
    0%   { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease-out; }
.animate-fade-in    { animation: fadeIn 0.3s ease-out; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-slide-up   { animation: slide-up 0.4s ease-out; }
.animate-bounce-in  { animation: bounce-in 0.6s ease-out; }

/* Carte de jeu */
.game-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.game-card:hover {
    border-color: rgba(233, 69, 96, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Bouton principal */
.btn-primary {
    background: linear-gradient(135deg, #e94560, #c81d4e);
    color: white;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #0f3460, #1a1a4e);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    border-color: rgba(255,255,255,0.2);
    background: linear-gradient(135deg, #163d72, #1a1a5e);
}

/* Swipe zone */
.swipe-zone {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(180deg, #1a1a2e, #0f3460);
    border: 2px dashed rgba(233, 69, 96, 0.3);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.3s ease;
}

.swipe-zone.active {
    border-color: #e94560;
    background: linear-gradient(180deg, #1a1a2e, #2a1a3e);
}

/* Role reveal card */
.role-card {
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    animation: bounce-in 0.5s ease-out;
}

.role-card.innocent {
    background: linear-gradient(135deg, #0f3460, #1a5276);
    border: 2px solid #3498db;
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.3);
}

.role-card.impostor {
    background: linear-gradient(135deg, #4a0e0e, #721c24);
    border: 2px solid #e94560;
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.4);
}

/* Input style */
.input-hub {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    width: 100%;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}

.input-hub:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.input-hub::placeholder {
    color: rgba(255,255,255,0.3);
}

/* Select style */
.select-hub {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    width: 100%;
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
    outline: none;
}

.select-hub:focus {
    border-color: #e94560;
}

.select-hub option {
    background: #1a1a2e;
    color: white;
}

/* Theme selection card */
.theme-option {
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.theme-option:hover {
    border-color: rgba(233, 69, 96, 0.3);
    background: rgba(233, 69, 96, 0.05);
}

.theme-option.selected {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.1);
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.2);
}

/* Score badge */
.score-badge {
    background: linear-gradient(135deg, #f5c518, #e6a817);
    color: #0f0f1a;
    font-weight: 800;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* Podium */
.podium-1 { background: linear-gradient(135deg, #f5c518, #e6a817); color: #0f0f1a; }
.podium-2 { background: linear-gradient(135deg, #bdc3c7, #95a5a6); color: #0f0f1a; }
.podium-3 { background: linear-gradient(135deg, #cd7f32, #a0522d); color: white; }

/* Hold button animation */
.hold-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #e94560;
    transition: width 0.05s linear;
    border-radius: 0 0 1rem 1rem;
}

/* Confetti */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s linear forwards;
    z-index: 100;
}

/* Number selector */
.number-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.number-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.number-btn:hover {
    background: rgba(233, 69, 96, 0.3);
    border-color: #e94560;
}

.number-btn:active {
    transform: scale(0.95);
}

.number-display {
    font-size: 2rem;
    font-weight: 800;
    min-width: 3rem;
    text-align: center;
    color: #e94560;
}

/* ============================================================
   Jeu de la Bombe — Styles spécifiques
   ============================================================ */

@keyframes bomb-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg) scale(1.05); }
    75% { transform: rotate(5deg) scale(1.05); }
}

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

@keyframes spark-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.5); }
}

@keyframes bomb-glow-red {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(233, 69, 96, 0.8)); }
}

.bomb-container {
    position: relative;
}

.bomb-visual {
    display: inline-block;
    position: relative;
    animation: bomb-pulse 2s ease-in-out infinite, bomb-glow-red 3s ease-in-out infinite;
}

.bomb-emoji {
    transition: all 0.3s;
    filter: drop-shadow(0 0 20px rgba(233, 69, 96, 0.3));
}

.bomb-fuse {
    position: absolute;
    top: -10px;
    right: 10px;
}

.bomb-spark {
    animation: spark-blink 0.5s ease-in-out infinite;
    font-size: 1.5rem;
}

.player-chip {
    transition: all 0.3s ease;
}

.player-chip.scale-110 {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
}

/* ============================================================
   Picolo Modifié — Styles spécifiques
   ============================================================ */

/* Animation de spin pour le tirage */
@keyframes picolo-spin-anim {
    0%   { transform: rotate(0deg) scale(1); }
    25%  { transform: rotate(90deg) scale(1.2); }
    50%  { transform: rotate(180deg) scale(1); }
    75%  { transform: rotate(270deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.picolo-spin {
    animation: picolo-spin-anim 0.6s ease-in-out infinite;
}

/* Dos de carte (avant tirage) */
.picolo-card-back {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 50%, #1a1a2e 100%);
    border: 2px dashed rgba(233, 69, 96, 0.4);
    border-radius: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

.picolo-card-back::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(233, 69, 96, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.picolo-card-back:hover {
    border-color: rgba(233, 69, 96, 0.7);
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.15);
    transform: translateY(-2px);
}

.picolo-card-back:active {
    transform: scale(0.98);
}

/* Carte révélée */
.picolo-card {
    border-radius: 1.25rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.picolo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Dot de joueur actif */
.picolo-dot-active {
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.6);
}

/* Custom scrollbar for reviews */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
