* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    animation: fadeIn 0.5s ease-in;
    transition: background 1s ease;
}

body.phase-day {
    background: linear-gradient(135deg, #ffd89b 0%, #f093fb 15%, #f5576c 30%, #ffd89b 45%, #ffb347 60%, #ffd89b 75%, #f093fb 90%, #ffd89b 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    position: relative;
}

body.phase-day::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 193, 7, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 216, 155, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: sunGlow 10s ease-in-out infinite;
}

@keyframes sunGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

body.phase-night {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 0;
    margin-bottom: 30px;
    transition: all 0.5s ease;
}

.header.header-day {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.5) 0%, rgba(255, 152, 0, 0.5) 50%, rgba(255, 87, 34, 0.5) 100%);
    box-shadow: 0 6px 30px rgba(255, 193, 7, 0.4),
                0 0 20px rgba(255, 193, 7, 0.2),
                inset 0 2px 0 rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid rgba(255, 193, 7, 0.6);
    position: relative;
    overflow: hidden;
}

.header.header-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: headerShine 3s ease-in-out infinite;
}

@keyframes headerShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header.header-night {
    background: rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 100;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-small img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.logo-small h1 {
    color: white;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username-display {
    color: white;
    font-weight: bold;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo img {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.logo h1 {
    color: white;
    font-size: 48px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.welcome-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.welcome-card h2 {
    margin-bottom: 10px;
    color: #667eea;
}

.welcome-card p {
    color: #666;
    margin-bottom: 30px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-refresh {
    background: #28a745;
    color: white;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Lobby */
.lobby-screen {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.lobby-actions {
    margin-bottom: 30px;
}

.lobby-actions h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.salons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.salon-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.salon-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.salon-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.salon-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.salon-type.public {
    color: #28a745;
}

.salon-type.private {
    color: #dc3545;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Room */
.room-screen {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.room-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.room-info h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.room-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    color: #666;
}

.room-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .room-content {
        grid-template-columns: 1fr;
    }
}

/* Players */
.players-section h3,
.chat-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.player-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.player-card.host {
    border-color: #ffc107;
    background: #fff3cd;
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.player-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.host-badge {
    margin-left: 5px;
}

/* Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 8px;
}

.chat-username {
    font-weight: bold;
    color: #667eea;
}

.chat-text {
    color: #333;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-top: 2px solid #e9ecef;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

/* Room Actions */
.room-actions {
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
    text-align: center;
}

.game-config {
    margin-bottom: 20px;
}

.info-text {
    color: #666;
    margin-top: 10px;
}

.waiting-message {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #667eea;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Game */
.game-screen {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.game-phase-message {
    text-align: center;
    padding: 60px 40px;
    margin: 40px 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-radius: 20px;
    border: 3px solid #667eea;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: slideIn 0.5s ease-out, glow 2s ease-in-out infinite;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
    z-index: 1;
}

.game-phase-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.game-phase-message h2 {
    font-size: 42px;
    color: #667eea;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3), 0 0 20px rgba(102, 126, 234, 0.5);
    font-weight: bold;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.5s ease-in;
    transition: all 0.3s ease;
}

.game-phase-message h2.message-change {
    animation: shake 0.5s ease-in-out;
}

.game-phase-message.phase-message-day {
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.95) 0%, rgba(255, 235, 205, 0.95) 50%, rgba(255, 224, 178, 0.95) 100%);
    border: 4px solid #ffc107;
    box-shadow: 0 0 40px rgba(255, 193, 7, 0.5), 
                0 0 80px rgba(255, 193, 7, 0.3),
                inset 0 0 30px rgba(255, 255, 255, 0.3),
                0 10px 40px rgba(255, 193, 7, 0.4);
    position: relative;
    overflow: visible;
}

.game-phase-message.phase-message-day::before {
    content: '☀️';
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 80px;
    opacity: 0.3;
    animation: sunRotate 20s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.5));
    z-index: 0;
}

.game-phase-message.phase-message-day::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    animation: sunPulse 3s ease-in-out infinite;
    z-index: 0;
}

.game-phase-message.phase-message-day h2 {
    color: #ff6b35;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3), 
                0 0 20px rgba(255, 193, 7, 0.6),
                0 0 40px rgba(255, 107, 53, 0.4);
    position: relative;
    z-index: 1;
    font-weight: 800;
    letter-spacing: 1px;
}

.day-decoration {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    z-index: 0;
}

.sun-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: sunRays 3s ease-in-out infinite;
}

.sun-rays::before,
.sun-rays::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255, 193, 7, 0.2);
    border-radius: 50%;
    animation: sunRays 3s ease-in-out infinite;
}

.sun-rays::before {
    animation-delay: 0.5s;
    width: 140px;
    height: 140px;
}

.sun-rays::after {
    animation-delay: 1s;
    width: 160px;
    height: 160px;
}

@keyframes sunRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes sunRays {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

/* Nouveau layout avec sidebar */
.game-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.players-list-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-item-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.player-item-compact:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.player-item-compact.player-item-day {
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.5) 0%, rgba(255, 255, 255, 0.5) 100%);
    border-color: rgba(255, 193, 7, 0.3);
}

.player-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.player-info-compact {
    flex: 1;
    min-width: 0;
}

.player-name-compact {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vote-status {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.voted-badge {
    background: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.not-voted {
    color: #999;
    font-size: 11px;
    font-style: italic;
}

.vote-count-badge {
    background: #ff6b35;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.events-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.event-item-compact {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    border-left: 3px solid #667eea;
    animation: slideIn 0.3s ease-out;
}

.game-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Bouton afficher carte */
.btn-show-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(20px);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.4),
        0 4px 12px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.btn-show-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.btn-show-card:hover::before {
    left: 100%;
}

.btn-show-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-show-card:hover::after {
    width: 300px;
    height: 300px;
}

.btn-show-card:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 
        0 12px 32px rgba(102, 126, 234, 0.5),
        0 6px 16px rgba(102, 126, 234, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-3px) scale(1.02);
}

.btn-show-card:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 16px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.phase-day .btn-show-card {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    box-shadow: 
        0 8px 24px rgba(255, 193, 7, 0.4),
        0 4px 12px rgba(255, 193, 7, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

body.phase-day .btn-show-card:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ff6b35 100%);
    box-shadow: 
        0 12px 32px rgba(255, 193, 7, 0.5),
        0 6px 16px rgba(255, 193, 7, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

/* Modal carte plein écran */
.card-modal-fullscreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.card-modal-fullscreen-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px;
}

.card-modal-close-fullscreen {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10001;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
}

.card-modal-close-fullscreen:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.card-modal-close-fullscreen:active {
    transform: translateY(0) scale(1.02);
}

.card-display-fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 90%;
}

.card-title-fullscreen {
    color: white;
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    animation: fadeIn 0.5s ease-in;
}

.card-image-fullscreen {
    width: auto;
    height: 80vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: slideIn 0.6s ease-out;
}

.card-name-fullscreen {
    font-size: 42px;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    animation: fadeIn 0.7s ease-in;
}

/* Fond "Le village dort" */
.village-sleeping {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 0.5s ease-in;
}

.sleeping-content {
    text-align: center;
    color: white;
    animation: pulse 3s ease-in-out infinite;
}

.sleeping-content h1 {
    font-size: 120px;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

.sleeping-content h2 {
    font-size: 64px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.sleeping-content p {
    font-size: 24px;
    opacity: 0.8;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Écran joueur mort */
.player-dead-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0a 50%, #0d0503 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 0.5s ease-in;
}

.dead-content {
    text-align: center;
    color: white;
}

.dead-content h1 {
    font-size: 120px;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

.dead-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #e74c3c;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.dead-content p {
    font-size: 20px;
    opacity: 0.7;
}

/* Menu d'action */
.action-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease;
}

.action-menu-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 10001;
    animation: slideInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
    border: 4px solid transparent;
    background-clip: padding-box;
}

.action-menu-content::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #667eea, #764ba2, #667eea);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.3;
    animation: gradientRotate 3s ease infinite;
    background-size: 200% 200%;
}

.action-menu-content.action-menu-day {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe5cc 50%, #ffd89b 100%);
    border: 5px solid #ffc107;
    box-shadow: 0 30px 80px rgba(255, 193, 7, 0.5), 
                0 0 60px rgba(255, 193, 7, 0.3),
                inset 0 0 40px rgba(255, 255, 255, 0.4),
                0 10px 50px rgba(255, 193, 7, 0.4);
    position: relative;
}

.action-menu-content.action-menu-day::before {
    background: linear-gradient(135deg, #ffc107, #ffb74d, #ff6b35, #ffb74d, #ffc107);
    opacity: 0.5;
    animation: gradientRotate 4s ease infinite;
}

.action-menu-content.action-menu-day::after {
    content: '☀️';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 60px;
    opacity: 0.2;
    animation: sunRotate 15s linear infinite;
    filter: drop-shadow(0 0 15px rgba(255, 193, 7, 0.4));
    z-index: 0;
}

.action-menu-content.action-menu-night {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border: 4px solid #667eea;
    box-shadow: 0 30px 80px rgba(102, 126, 234, 0.4), 0 0 40px rgba(102, 126, 234, 0.2);
}

@keyframes slideInScale {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes gradientRotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.action-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, transparent, #667eea, transparent) 1;
    position: relative;
    z-index: 2;
}

.action-menu-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.5), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

.action-menu-day .action-menu-header {
    border-image: linear-gradient(90deg, transparent, #ffc107, transparent) 1;
}

.action-menu-day .action-menu-header::after {
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.5), transparent);
}

.action-menu-header h2 {
    color: #667eea;
    font-size: 32px;
    margin: 0;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
    animation: fadeIn 0.6s ease-in;
}

.action-menu-day .action-menu-header h2 {
    color: #ff6b35;
    text-shadow: 2px 2px 8px rgba(255, 107, 53, 0.3);
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.action-menu-close {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 
        0 6px 20px rgba(220, 53, 69, 0.4),
        0 3px 10px rgba(220, 53, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 3;
    overflow: hidden;
    flex-shrink: 0;
}

.action-menu-close::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-menu-close:hover::before {
    width: 300px;
    height: 300px;
}

.action-menu-close:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 
        0 8px 25px rgba(220, 53, 69, 0.5),
        0 4px 12px rgba(220, 53, 69, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.action-menu-close:active {
    transform: scale(1.05) rotate(90deg);
    box-shadow: 
        0 4px 15px rgba(220, 53, 69, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.action-targets-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
    margin-top: 35px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 193, 7, 0.3);
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.3),
                0 4px 15px rgba(255, 193, 7, 0.2);
    position: relative;
    z-index: 1;
}

.action-menu-day .action-targets-menu {
    background: rgba(255, 248, 220, 0.2);
    border-color: rgba(255, 193, 7, 0.4);
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.4),
                0 4px 15px rgba(255, 193, 7, 0.3);
}

.player-action-btn-menu:nth-child(1) { animation-delay: 0.1s; }
.player-action-btn-menu:nth-child(2) { animation-delay: 0.2s; }
.player-action-btn-menu:nth-child(3) { animation-delay: 0.3s; }
.player-action-btn-menu:nth-child(4) { animation-delay: 0.4s; }
.player-action-btn-menu:nth-child(5) { animation-delay: 0.5s; }
.player-action-btn-menu:nth-child(n+6) { animation-delay: 0.6s; }

.action-icon {
    font-size: 40px;
    margin-bottom: 5px;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: floatIcon 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
    display: block;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.player-action-btn-menu:hover .action-icon {
    transform: scale(1.3) translateY(-3px);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    animation: none;
}

.action-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    font-weight: 500;
    opacity: 0.7;
    transition: all 0.4s ease;
    text-align: center;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
    display: block;
}

.player-action-btn-menu:hover .action-hint {
    color: white;
    opacity: 1;
    transform: translateY(-2px);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.player-action-btn-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.2),
        0 5px 15px rgba(102, 126, 234, 0.15),
        inset 0 2px 0 rgba(255,255,255,0.9),
        inset 0 -2px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-in backwards;
    min-height: 180px;
    justify-content: center;
    color: #333;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}

.player-action-btn-menu:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.player-action-btn-menu:disabled:hover {
    transform: none !important;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.2),
        0 5px 15px rgba(102, 126, 234, 0.15),
        inset 0 2px 0 rgba(255,255,255,0.9),
        inset 0 -2px 0 rgba(0, 0, 0, 0.05) !important;
}

.player-action-btn-menu::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.player-action-btn-menu::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.player-action-btn-menu:hover::after {
    left: 100%;
}

.player-action-btn-menu:hover::before {
    opacity: 1;
}

.player-action-btn-menu .player-avatar {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25), 
                0 0 0 4px rgba(255,255,255,0.5),
                0 0 20px rgba(102, 126, 234, 0.3);
    width: 80px;
    height: 80px;
    font-size: 32px;
    border: 4px solid rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.player-action-btn-menu:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-12px) scale(1.08) rotate(1deg);
    box-shadow: 
        0 20px 50px rgba(102, 126, 234, 0.6),
        0 10px 25px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(102, 126, 234, 0.4),
        inset 0 3px 0 rgba(255,255,255,0.3),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    border: none;
}

.player-action-btn-menu:hover .player-avatar {
    transform: scale(1.2) rotate(-8deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 
                0 0 0 5px rgba(255,255,255,0.6),
                0 0 30px rgba(255,255,255,0.4);
    border-color: rgba(255, 255, 255, 0.8);
}

.player-action-btn-menu:active {
    transform: translateY(-6px) scale(1.06);
}

.action-menu-day .player-action-btn-menu {
    border: none;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe5cc 100%);
    box-shadow: 
        0 10px 30px rgba(255, 193, 7, 0.2),
        0 5px 15px rgba(255, 193, 7, 0.15),
        inset 0 2px 0 rgba(255,255,255,0.9),
        inset 0 -2px 0 rgba(0, 0, 0, 0.05);
}

.action-menu-day .player-action-btn-menu::before {
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2) 0%, transparent 70%);
}

.action-menu-day .player-action-btn-menu .player-avatar {
    box-shadow: 0 6px 20px rgba(0,0,0,0.25), 
                0 0 0 4px rgba(255,255,255,0.5),
                0 0 20px rgba(255, 193, 7, 0.3);
}

.action-menu-day .player-action-btn-menu:hover {
    background: linear-gradient(135deg, #ffc107 0%, #ff6b35 100%);
    border: none;
    box-shadow: 
        0 20px 50px rgba(255, 193, 7, 0.6),
        0 10px 25px rgba(255, 193, 7, 0.5),
        0 0 40px rgba(255, 193, 7, 0.4),
        inset 0 3px 0 rgba(255,255,255,0.3),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-12px) scale(1.08) rotate(-1deg);
}

.action-menu-day .player-action-btn-menu:hover .player-avatar {
    transform: scale(1.2) rotate(8deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 
                0 0 0 5px rgba(255,255,255,0.6),
                0 0 30px rgba(255,255,255,0.4);
}

.btn-open-action {
    margin-top: 30px;
    padding: 22px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(20px);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.5),
        0 5px 15px rgba(102, 126, 234, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    justify-content: center;
    letter-spacing: 0.5px;
}

.btn-open-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.7s ease;
}

.btn-open-action:hover::before {
    left: 100%;
}

.btn-open-action::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.7s ease, height 0.7s ease;
}

.btn-open-action:hover::after {
    width: 400px;
    height: 400px;
}

.btn-open-action span {
    position: relative;
    z-index: 2;
}

.btn-open-action:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.6),
        0 8px 20px rgba(102, 126, 234, 0.5),
        inset 0 3px 0 rgba(255, 255, 255, 0.4),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-4px) scale(1.03);
}

.btn-open-action:active {
    transform: translateY(-2px) scale(0.99);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

body.phase-day .btn-open-action {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    box-shadow: 
        0 10px 30px rgba(255, 193, 7, 0.5),
        0 5px 15px rgba(255, 193, 7, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

body.phase-day .btn-open-action:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ff6b35 100%);
    box-shadow: 
        0 15px 40px rgba(255, 193, 7, 0.6),
        0 8px 20px rgba(255, 193, 7, 0.5),
        inset 0 3px 0 rgba(255, 255, 255, 0.4),
        inset 0 -3px 0 rgba(0, 0, 0, 0.1);
}

/* Système de vote amélioré */
.vote-progress {
    margin-top: 25px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 248, 220, 0.7) 100%);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3),
                inset 0 2px 5px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.action-menu-day .vote-progress {
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.9) 0%, rgba(255, 235, 205, 0.9) 100%);
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4),
                inset 0 2px 5px rgba(255, 255, 255, 0.6);
}

.vote-progress::before {
    content: '🗳️';
    position: absolute;
    left: 15px;
    font-size: 24px;
    opacity: 0.3;
    animation: floatIcon 2s ease-in-out infinite;
}

.vote-progress-bar {
    flex: 1;
    height: 18px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.vote-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

.vote-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 50%, #8bc34a 100%);
    background-size: 200% 100%;
    border-radius: 15px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
    animation: progressFlow 2s ease-in-out infinite;
}

.vote-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progressShimmer 1.5s ease-in-out infinite;
}

body.phase-day .vote-progress-fill {
    background: linear-gradient(90deg, #ffc107 0%, #ffb74d 25%, #ff9800 50%, #ff6b35 75%, #ffc107 100%);
    background-size: 200% 100%;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.5), 
                inset 0 2px 0 rgba(255,255,255,0.4),
                0 0 20px rgba(255, 193, 7, 0.3);
    position: relative;
}

body.phase-day .vote-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

.vote-progress-text {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    min-width: 80px;
    text-align: center;
}

@keyframes progressFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes progressShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes progressShine {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.5; }
}

.player-name-action {
    font-weight: 700;
    margin-top: 10px;
    font-size: 18px;
    transition: all 0.4s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
    color: #333;
    display: block;
}

.player-action-btn-menu:hover .player-name-action {
    color: white;
    text-shadow: 0 3px 6px rgba(0,0,0,0.4), 0 0 10px rgba(255,255,255,0.3);
    transform: scale(1.1) translateY(-2px);
    font-size: 19px;
}

.vote-count-display {
    margin-top: 10px;
    font-size: 14px;
    color: #ff6b35;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(255, 107, 53, 0.3) 100%);
    padding: 8px 16px;
    border-radius: 15px;
    border: 3px solid rgba(255, 107, 53, 0.4);
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.3),
                inset 0 1px 0 rgba(255,255,255,0.5);
    transition: all 0.4s ease;
    animation: fadeIn 0.6s ease-in;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
    display: block;
}

.player-action-btn-menu:hover .vote-count-display {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.35) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4),
                inset 0 1px 0 rgba(255,255,255,0.6),
                0 0 15px rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    
    .game-sidebar {
        order: 2;
    }
    
    .game-main {
        order: 1;
    }
    
    .card-image-modal {
        width: 280px;
        height: 420px;
    }
    
    .btn-open-action {
        min-width: auto;
        width: 100%;
        max-width: 100%;
        padding: 18px 30px;
        font-size: 17px;
        border-radius: 50px;
    }
    
    .btn-show-card {
        padding: 10px 18px;
        font-size: 13px;
        border-radius: 50px;
    }
    
    .player-action-btn-menu {
        min-width: 120px;
        padding: 20px 15px;
        border-radius: 25px;
        min-height: 160px;
    }
    
    .action-targets-menu {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
        padding: 20px;
    }
    
    .action-menu-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .action-menu-header h2 {
        font-size: 24px;
    }
    
    .game-phase-message {
        padding: 40px 20px;
    }
    
    .game-phase-message h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-content h1 {
        font-size: 22px;
    }
    
    .btn-show-card {
        padding: 10px 16px;
        font-size: 12px;
        width: 100%;
        max-width: 200px;
    }
    
    .btn-open-action {
        padding: 16px 25px;
        font-size: 16px;
        min-width: auto;
    }
    
    .game-phase-message {
        padding: 30px 15px;
        margin: 20px 0;
    }
    
    .game-phase-message h2 {
        font-size: 24px;
    }
    
    .action-menu-content {
        padding: 25px 15px;
        width: 98%;
        max-height: 95vh;
    }
    
    .action-menu-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .action-menu-header h2 {
        font-size: 20px;
        margin: 0;
    }
    
    .action-menu-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .action-targets-menu {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
        padding: 15px;
    }
    
    .player-action-btn-menu {
        min-width: 100px;
        padding: 15px 10px;
        min-height: 140px;
        gap: 10px;
    }
    
    .player-action-btn-menu .player-avatar {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .player-name-action {
        font-size: 14px;
    }
    
    .action-icon {
        font-size: 30px;
    }
    
    .action-hint {
        font-size: 10px;
    }
    
    .vote-progress {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .vote-progress-text {
        font-size: 14px;
    }
    
    .vote-count-display {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 18px;
    }
    
    .btn-show-card {
        padding: 8px 14px;
        font-size: 11px;
    }
    
    .game-phase-message h2 {
        font-size: 20px;
    }
    
    .action-targets-menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .player-action-btn-menu {
        min-width: auto;
        padding: 12px 8px;
        min-height: 120px;
    }
    
    .action-menu-header h2 {
        font-size: 18px;
    }
}

.game-info {
    text-align: center;
    margin-bottom: 30px;
}

.game-info h2 {
    color: #667eea;
    font-size: 32px;
}

.role-reveal {
    text-align: center;
    margin-bottom: 40px;
}

.role-reveal h3 {
    color: #333;
    margin-bottom: 20px;
}

.role-card {
    display: inline-block;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #667eea;
}

.role-card img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.role-card h4 {
    color: #667eea;
    font-size: 24px;
}


.game-players {
    margin-top: 40px;
    animation: slideIn 0.6s ease-out;
}

.game-players h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.players-grid .player-card {
    animation: fadeIn 0.5s ease-in;
    transition: all 0.3s ease;
}

.players-grid .player-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.player-card.player-card-day {
    border: 2px solid rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 248, 220, 0.9) 100%);
}

.player-card.player-card-day:hover {
    border-color: #ffc107;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    transform: translateY(-5px) scale(1.05);
}

.vote-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #4caf50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    animation: fadeIn 0.5s ease-in;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.action-panel {
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    border: 3px solid #667eea;
    animation: slideIn 0.5s ease-out;
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

.action-panel.action-panel-day {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 87, 34, 0.15) 100%);
    border: 3px solid #ffc107;
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.2);
}

.vote-header {
    text-align: center;
    margin-bottom: 25px;
}

.vote-header h3 {
    color: #ff6b35;
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.vote-header .vote-info {
    color: #666;
    font-size: 16px;
    font-style: italic;
}

.action-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.action-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.player-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 25px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    animation: fadeIn 0.5s ease-in;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.player-action-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    border-color: #764ba2;
}

.player-action-btn.vote-btn {
    border-color: #ffc107;
    position: relative;
}

.player-action-btn.vote-btn:hover {
    background: linear-gradient(135deg, #ffc107 0%, #ff6b35 100%);
    border-color: #ff6b35;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
}

.vote-icon {
    font-size: 20px;
    margin-top: 5px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.player-action-btn.vote-btn:hover .vote-icon {
    opacity: 1;
    transform: scale(1.2);
}

.player-action-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.player-action-btn .player-avatar {
    transition: all 0.3s ease;
}

.player-action-btn:hover .player-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.waiting-action {
    text-align: center;
    padding: 40px;
    color: #999;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
    font-size: 20px;
    font-weight: 500;
    border: 2px solid #ddd;
    transition: all 0.5s ease;
}

.waiting-action.waiting-day {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 87, 34, 0.1) 100%);
    border: 2px solid #ffc107;
    color: #ff6b35;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

.waiting-action::before {
    content: '⏳ ';
    font-size: 24px;
    animation: pulse 1.5s ease-in-out infinite;
}

.game-events {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.game-events h3 {
    color: #667eea;
    margin-bottom: 15px;
    transition: color 0.5s ease;
}

body.phase-day .game-events h3 {
    color: #ff6b35;
}

.events-list {
    max-height: 200px;
    overflow-y: auto;
}

.event-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    animation: slideIn 0.4s ease-out;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #333;
}

.event-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.2);
    border-left-width: 6px;
}

.player-card.dead {
    opacity: 0.5;
    position: relative;
}

.player-card.dead::after {
    content: '💀';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 20px;
}

.vote-count {
    font-size: 12px;
    color: #dc3545;
    font-weight: bold;
    margin-top: 5px;
}

.role-description {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

.win-modal {
    animation: fadeIn 0.5s ease-in;
}

