/* GuessKaro Multiplayer Styles - Clean Version */

/* Base Reset and Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Devanagari', Arial, sans-serif;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 25%, #FFD23F 50%, #06FFA5 75%, #4ECDC4 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Keyframe Animations */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 107, 53, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 53, 0.6); }
    100% { box-shadow: 0 0 5px rgba(255, 107, 53, 0.3); }
}

@keyframes confetti {
    0% { transform: translateY(-10px) rotateZ(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotateZ(720deg); opacity: 0; }
}

@keyframes scorePopup {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-40px) scale(1); opacity: 0; }
}

@keyframes celebrationBounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0,-20px,0); }
    70% { transform: translate3d(0,-10px,0); }
    90% { transform: translate3d(0,-4px,0); }
}

@keyframes celebrationGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    }
}

@keyframes winnerGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.9);
    }
}

@keyframes runnerUpGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.03);
        opacity: 0.9;
    }
}

@keyframes celebrationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes winnerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes messageGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
        transform: scale(1.02);
    }
}

@keyframes copySuccess {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes revealPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3) translateY(-30px); opacity: 0; }
    50% { transform: scale(1.1) translateY(0); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes zoomIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes letterReveal {
    0% {
        transform: scale(1) rotateY(0deg);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2) rotateY(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.1) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes letterComplete {
    0% { transform: scale(1.1); }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.6);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
    }
}

@keyframes celebration {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-2deg) scale(1.05); }
    75% { transform: rotate(2deg) scale(1.05); }
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Success Celebration Effects */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    opacity: 0.8;
    animation: confetti 3s linear forwards;
}

.score-popup {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    color: #FFD23F;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 1000;
    animation: scorePopup 2s ease-out forwards;
    pointer-events: none;
}

.celebration-message {
    background: linear-gradient(135deg, #FFD23F, #FF6B35);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    animation: celebrationBounce 1s ease-out;
    text-align: center;
    margin: 1rem 0;
}

/* Layout Components */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 1rem;
    padding: 1rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Screen Management */
.screen {
    display: none;
    padding: 1rem;
    position: relative;
    z-index: 10;
}

.screen.active {
    display: block;
    min-height: calc(100vh - 2rem);
}

/* Hide footer when game screen is active */
#game-screen.active ~ .game-footer {
    display: none;
}

/* Alternative: Add class to body to hide footer */
body.in-game .game-footer {
    display: none;
}

/* Main Menu Styles */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.main-content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 107, 53, 0.6);
}

.main-content:hover::before {
    left: 100%;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
}

.welcome-section h2 {
    color: #ff6b35;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-section p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #666;
}

/* Status Messages */
.status {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
    text-align: center;
}

.status.connected {
    background: #d4edda;
    color: #155724;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Game Status and Celebration Styles */
.game-status.celebration {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffb347);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1.5rem;
    border-radius: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: celebrationGlow 2s ease-in-out infinite;
    text-align: center;
    margin: 1rem 0;
    position: relative;
    z-index: 10;
}

.word-display.winner-announcement {
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    color: #333;
    font-size: 1.8rem;
    font-weight: bold;
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    animation: winnerGlow 1.5s ease-in-out infinite;
    margin: 1rem 0;
    position: relative;
    z-index: 20;
    clear: both;
}

.word-display.runner-up-announcement {
    background: linear-gradient(45deg, #87ceeb, #add8e6, #87ceeb);
    color: #333;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 1.2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.4);
    animation: runnerUpGlow 2s ease-in-out infinite;
    margin: 1rem 0;
    position: relative;
    z-index: 20;
    clear: both;
}

.word-display.celebration-message {
    background: linear-gradient(45deg, #ff69b4, #ffc0cb, #ff69b4);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1.2rem;
    border-radius: 15px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    animation: celebrationPulse 2s ease-in-out infinite;
    margin: 1rem 0;
    position: relative;
    z-index: 20;
    clear: both;
}

/* Confetti Styles */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ff6b35;
    animation: confetti-fall 3s linear infinite;
    z-index: 1000;
}

.confetti:nth-child(odd) {
    background: #f7931e;
    animation-delay: -0.5s;
}

.confetti:nth-child(even) {
    background: #ffd700;
    animation-delay: -1s;
}

/* Chat Celebration Styles */
.chat-message.celebration {
    margin-bottom: 1rem;
    display: block;
    clear: both;
    position: relative;
}

.chat-message.celebration .chat-text {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    font-weight: bold;
    border-radius: 20px;
    padding: 0.8rem 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    display: block;
    text-align: center;
    margin: 0.5rem 0;
    position: relative;
    animation: messageGlow 2s ease-in-out infinite;
}

/* Form Elements */
.menu-options {
    margin-top: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #ff6b35;
}

/* Button Styles */
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e55a2b, #e6841a);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #06FFA5, #4ECDC4);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 255, 165, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #FFD23F, #FFA726);
    color: #333;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 210, 63, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #4ECDC4, #45B7AF);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalAppear 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #ff6b35;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 1.5rem;
}

/* Settings Modal Styles */
.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.setting-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.setting-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.setting-group select:hover {
    border-color: #ff6b35;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Game Room Layout */
.room-header {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.game-layout {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    grid-template-areas: "players game chat";
    grid-template-rows: 1fr;
    gap: 1rem;
    height: calc(100vh - 200px);
    min-height: 600px;
    max-height: calc(100vh - 150px);
    position: relative;
    z-index: 10;
}

/* Players Panel */
.players-panel {
    grid-area: players;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.players-panel h4 {
    color: #ff6b35;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 0.5rem;
}

.player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.player:hover {
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-color: rgba(255, 107, 53, 0.4);
}

.player.host {
    background: linear-gradient(135deg, rgba(255, 210, 63, 0.9), rgba(255, 193, 7, 0.8));
    border-color: rgba(255, 210, 63, 0.6);
}

.player.drawing {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9), rgba(69, 183, 175, 0.8));
    border-color: rgba(78, 205, 196, 0.6);
    animation: pulse 2s infinite;
}

/* Game Area */
.game-area {
    grid-area: game;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.word-display {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.word-display h3 {
    margin: 0;
    font-size: 1.3rem;
}

.word-display.drawing h3 {
    color: #28a745;
}

.word-display.guessing h3 {
    color: #17a2b8;
}

.word-display.finished {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    animation: celebration 3s infinite;
}

.game-timer {
    font-size: 1.1rem;
    font-weight: bold;
    color: #dc3545;
    background: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
    margin: 5px 0;
}

/* Word Hints */
.word-hints {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    border: 2px solid #ff6b35;
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.2);
}

.word-hints h4 {
    color: #ff6b35;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.hint-boxes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hint-box {
    width: 40px;
    height: 40px;
    border: 3px solid #ff6b35;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.hint-box.revealed {
    background: #ff6b35;
    color: white;
    transform: scale(1.1);
    animation: letterReveal 0.5s ease-in-out;
}

.hint-box.completed {
    background: #28a745;
    color: white;
    border-color: #28a745;
    animation: letterComplete 0.5s ease-in-out;
}

.hint-box.space {
    border: none;
    background: transparent;
    width: 20px;
}

/* Word Reveal Display */
.word-reveal {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
    border: 3px solid #fff;
    animation: revealPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.word-reveal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

.reveal-container {
    position: relative;
    z-index: 2;
}

.reveal-title {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: bounceIn 0.8s ease-out;
}

.reveal-word {
    background: white;
    color: #ff6b35;
    font-size: 2rem;
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    margin: 1rem 0;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.1);
    animation: zoomIn 1s ease-out 0.3s both;
}

.reveal-next {
    color: white;
    font-size: 1.1rem;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease-out 0.6s both;
}

/* Canvas and Drawing Tools */
.canvas-container {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.drawing-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.color-palette {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    max-width: 220px;
    margin-bottom: 0.5rem;
}

.color-option {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-option:hover,
.color-option.active {
    border-color: #333;
    transform: scale(1.1);
}

#gameCanvas {
    border: 3px solid rgba(255, 107, 53, 0.3);
    border-radius: 15px;
    cursor: crosshair;
    background: white;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    
    /* Touch optimization for mobile */
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#gameCanvas:hover {
    border-color: rgba(255, 107, 53, 0.6);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* NEW Engaging Chat Panel Design - Right Side */
.chat-panel {
    grid-area: chat;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    border: 2px solid #007bff;
    border-radius: 15px;
    padding: 0;
    box-shadow: 
        0 8px 25px rgba(0, 123, 255, 0.2),
        0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 500px;
    min-height: 420px;
    width: 100%;
    max-width: 300px;
    position: relative;
    box-sizing: border-box;
}

.chat-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 20px;
    border-bottom: none;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-icon {
    font-size: 1.4rem;
    animation: chatPulse 2s ease-in-out infinite;
}

@keyframes chatPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chat-title h4 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.chat-status {
    position: relative;
    z-index: 1;
}

.chat-status .online-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.btn-icon span {
    font-size: 1rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(248,249,250,0.9));
    min-height: 260px;
    max-height: 320px;
    border-bottom: 1px solid rgba(0, 123, 255, 0.2);
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 107, 53, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
}

.chat-welcome-message {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    opacity: 0.7;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: welcomeBounce 3s ease-in-out infinite;
}

@keyframes welcomeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.chat-welcome-message p {
    font-style: italic;
    margin: 0;
}

.chat-message {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 90%;
    word-wrap: break-word;
    clear: both;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-message.own {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: right;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.chat-message.other {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,249,250,0.9));
    color: #333333;
    margin-right: auto;
    border: 1px solid rgba(0, 123, 255, 0.2);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.chat-message.system {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    text-align: center;
    font-style: italic;
    margin: 0.5rem auto;
    max-width: 70%;
    font-size: 0.9rem;
}

.chat-message.correct-guess {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-align: center;
    font-weight: bold;
    margin: 0.75rem auto;
    max-width: 90%;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: correctGuessGlow 2s ease-in-out;
}

.chat-message.word-reveal {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    text-align: center;
    font-weight: bold;
    margin: 0.75rem auto;
    max-width: 90%;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: wordRevealPulse 3s ease-in-out;
}

.message-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.message-sender {
    font-weight: 700;
    color: #ff6b35;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(255, 107, 53, 0.1);
}

.message-time {
    color: #666;
    font-size: 0.75rem;
}

.message-content {
    margin: 0;
}

.typing-indicator {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 107, 53, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 107, 53, 0.1);
    font-size: 0.9rem;
    color: #666;
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ff6b35;
    animation: typingDot 1.4s ease-in-out infinite both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.chat-input-container {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95));
    padding: 20px 20px 25px 20px;
    border-top: 1px solid rgba(0, 123, 255, 0.2);
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 90px;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    margin-top: auto;
}

.chat-input {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: block;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px;
    border: 2px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #333333;
    background: #ffffff;
    box-sizing: border-box;
    height: 55px;
    outline: none;
    transition: border-color 0.2s;
}

.input-wrapper input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* Footer Styles */
.game-footer {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* Hide footer during game */
.screen:not(#mainMenu).active ~ .game-footer,
body:has(.screen:not(#mainMenu).active) .game-footer {
    display: none;
}

/* Alternative approach for broader browser support */
.hide-footer .game-footer {
    display: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-brand {
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2rem;
    margin-bottom: 1rem;
}

.footer-brand h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #f39c12;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-brand p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #f39c12;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(243, 156, 18, 0.3);
    padding-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-section ul li a:hover {
    color: #f39c12;
    transform: translateX(5px);
    text-decoration: underline;
}

.footer-contact {
    text-align: center;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    margin-top: 1rem;
}

.footer-contact p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.footer-contact a {
    color: #f39c12;
    text-decoration: none;
    font-weight: 600;
}

.footer-contact a:hover {
    text-decoration: underline;
    color: #e67e22;
}

/* Footer Modal Styles */
#footerModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

#footerModal .modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

#footerModal .modal-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#footerModal .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

#footerModal .modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    line-height: 1.6;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .game-footer {
        padding: 2rem 1rem 1.5rem;
        margin-top: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-brand h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
    }
    
    .footer-section ul li a {
        font-size: 0.85rem;
    }
}

/* Small buttons for chat section only */
.btn-send {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 35px;
    min-width: 60px;
    font-family: Arial, sans-serif;
}

.btn-send:hover,
.chat-panel .btn-small:hover {
    background: #45a049;
}

.btn-send:active {
    transform: translateY(0);
}

.btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.voice-controls {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95));
    padding: 10px 20px;
    border-top: 1px solid rgba(0, 123, 255, 0.2);
    border-bottom: 1px solid rgba(0, 123, 255, 0.2);
    display: flex;
    gap: 8px;
    backdrop-filter: blur(5px);
    min-height: 50px;
}

.btn-voice {
    flex: 1;
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
    text-shadow: none;
    height: 35px;
    max-width: 110px;
}

.btn-voice.leave {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    box-shadow: 
        0 3px 12px rgba(108, 117, 125, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-voice:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(23, 162, 184, 0.4);
}

.btn-voice.leave:hover {
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

.voice-icon {
    font-size: 1.1rem;
}

/* Enhanced Scoreboard Styles */
.scoreboard {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: visible;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.scoreboard-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.trophy-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    animation: trophyBounce 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes trophyBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.scoreboard-header h4 {
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scoreboard-glow {
    display: none;
}

.scores-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.score-item {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideInScore 0.6s ease-out forwards;
    opacity: 0;
    transform: translateX(-50px);
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    max-width: 100%;
}

@keyframes slideInScore {
    0% {
        opacity: 0;
        transform: translateX(-50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.score-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

.rank-section {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 45px;
    max-width: 45px;
    position: relative;
    flex-shrink: 0;
}

.rank-icon {
    font-size: 1.2rem;
    animation: medalSpin 3s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes medalSpin {
    0%, 90%, 100% { transform: rotateY(0); }
    45% { transform: rotateY(180deg); }
}

.rank-number {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    min-width: 15px;
}

.rank-section.gold .rank-number {
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rank-section.silver .rank-number {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.6);
}

.rank-section.bronze .rank-number {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.6);
}

.player-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.player-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    margin-right: 0.5rem;
}

.score-badge {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    min-width: 50px;
    justify-content: center;
}

.score-number {
    font-weight: bold;
    color: white;
    font-size: 1rem;
    margin-right: 0.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.score-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Special effects for top 3 positions */
.score-item.rank-1 {
    border: 2px solid rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.score-item.rank-2 {
    border: 2px solid rgba(192, 192, 192, 0.6);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.08));
}

.score-item.rank-3 {
    border: 2px solid rgba(205, 127, 50, 0.6);
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.08));
}

.score-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.score-item:hover .score-animation {
    transform: translateX(100%);
}

/* Responsive design for scoreboard */
@media (max-width: 768px) {
    .scoreboard {
        padding: 0.75rem;
        margin: 0.5rem 0;
        border-radius: 15px;
    }
    
    .trophy-icon {
        font-size: 1.2rem;
        margin-right: 0.3rem;
    }
    
    .scoreboard-header h4 {
        font-size: 1.1rem;
    }
    
    .score-item {
        padding: 0.4rem 0.5rem;
        border-radius: 10px;
        min-height: 45px;
    }
    
    .rank-section {
        min-width: 35px;
        max-width: 35px;
        gap: 0.2rem;
    }
    
    .rank-icon {
        font-size: 1rem;
    }
    
    .rank-number {
        font-size: 0.8rem;
        min-width: 12px;
    }
    
    .player-info {
        margin-left: 0.3rem;
    }
    
    .player-name {
        font-size: 0.9rem;
        margin-right: 0.3rem;
    }
    
    .score-badge {
        padding: 0.2rem 0.4rem;
        border-radius: 12px;
        min-width: 40px;
    }
    
    .score-number {
        font-size: 0.9rem;
        margin-right: 0.1rem;
    }
    
    .score-label {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .scoreboard {
        padding: 0.5rem;
        margin: 0.25rem 0;
    }
    
    .trophy-icon {
        font-size: 1rem;
    }
    
    .scoreboard-header h4 {
        font-size: 1rem;
    }
    
    .score-item {
        padding: 0.3rem 0.4rem;
        min-height: 40px;
    }
    
    .rank-section {
        min-width: 30px;
        max-width: 30px;
    }
    
    .rank-icon {
        font-size: 0.9rem;
    }
    
    .rank-number {
        font-size: 0.7rem;
    }
    
    .player-name {
        font-size: 0.8rem;
    }
    
    .score-badge {
        min-width: 35px;
        padding: 0.15rem 0.3rem;
    }
    
    .score-number {
        font-size: 0.8rem;
    }
    
    .score-label {
        font-size: 0.5rem;
    }
}

@keyframes correctGuessGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3); }
    50% { box-shadow: 0 6px 25px rgba(40, 167, 69, 0.6), 0 0 20px rgba(40, 167, 69, 0.4); }
}

.chat-message.word-reveal {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    padding: 0.75rem 1rem;
    border-radius: 25px;
    text-align: center;
    font-weight: bold;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    animation: wordRevealPulse 3s ease-in-out;
    margin: 0.75rem 0;
    font-size: 1.1rem;
}

@keyframes wordRevealPulse {
    0% { transform: scale(1); box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4); }
    25% { transform: scale(1.05); box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6); }
    50% { transform: scale(1.02); box-shadow: 0 10px 35px rgba(255, 107, 53, 0.8); }
    75% { transform: scale(1.01); box-shadow: 0 8px 30px rgba(255, 107, 53, 0.6); }
    100% { transform: scale(1); box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4); }
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.chat-input input:focus {
    outline: none;
    border-color: #ff6b35;
}

/* Message Types */
.message {
    padding: 0.8rem;
    margin: 0.5rem 0;
    border-radius: 5px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-layout {
        grid-template-columns: 200px 1fr 250px;
    }
}

@media (max-width: 992px) {
    .game-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .room-header {
        flex-direction: column;
        text-align: center;
    }
    
    .drawing-tools {
        justify-content: center;
    }
}

/* Enhanced Mobile Optimization */
@media (max-width: 768px) {
    .game-container {
        padding: 5px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    /* Improved touch targets for mobile */
    .btn {
        min-height: 48px;
        font-size: 1.1rem;
        padding: 0.75rem 1.25rem;
        margin: 0.25rem;
        border-radius: 12px;
        width: 100%;
        max-width: 250px;
    }
    
    /* Enhanced drawing tools layout for mobile */
    .tool-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
        background: rgba(255, 255, 255, 0.1);
        padding: 1rem;
        border-radius: 15px;
    }
    
    .tool-group label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    /* Color palette - larger touch targets */
    .color-option {
        width: 40px;
        height: 40px;
        margin: 0.25rem;
        border-width: 3px;
    }
    
    .color-palette {
        justify-content: center;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        margin: 1rem 0;
    }
    
    /* Canvas optimizations for mobile */
    #gameCanvas {
        width: 100%;
        max-width: 350px;
        height: auto;
        min-height: 300px;
        border-width: 3px;
        margin: 1rem auto;
        border-radius: 20px;
        overscroll-behavior: none;
    }
    
    /* Prevent page scrolling when touching canvas area */
    .canvas-container {
        overflow: hidden;
        overscroll-behavior: contain;
    }
    
    .drawing-tools {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Range inputs - better mobile handling */
    input[type="range"] {
        width: 100%;
        height: 40px;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
        cursor: pointer;
    }
    
    input[type="range"]::-webkit-slider-track {
        height: 8px;
        background: linear-gradient(135deg, #FF6B35, #F7931E);
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 24px;
        height: 24px;
        background: linear-gradient(135deg, #FF6B35, #F7931E);
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
        border: 2px solid white;
    }
    
    /* Players list mobile improvements */
    .player {
        padding: 1rem;
        margin-bottom: 0.75rem;
        border-radius: 15px;
        font-size: 1.1rem;
        min-height: 60px;
    }
    
    /* Chat improvements for mobile */
    .chat-panel {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .chat-messages {
        max-height: 250px;
        font-size: 1rem;
        border-radius: 12px;
        padding: 0.75rem;
    }
    
    #chatInput {
        font-size: 1.1rem;
        padding: 0.75rem;
        border-radius: 12px;
        min-height: 48px;
        border: 2px solid #ddd;
    }
    
    #chatInput:focus {
        border-color: #FF6B35;
        box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
    }
    
    /* Word display mobile */
    .word-display {
        padding: 1.5rem;
        font-size: 1.2rem;
        border-radius: 15px;
        margin: 1rem 0;
        min-height: 80px;
    }
    
    .word-hints {
        padding: 1.5rem;
        border-radius: 15px;
        border-width: 3px;
    }
    
    .hint-box {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
        border-width: 3px;
        border-radius: 12px;
    }
    
    /* Celebration effects mobile */
    .celebration-message {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
        margin: 0 1rem;
        border-radius: 20px;
    }
    
    .score-popup {
        font-size: 2.5rem;
    }
    
    /* Modal improvements for mobile */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 1.5rem;
        border-radius: 20px 20px 0 0;
    }
    
    .close {
        font-size: 2.5rem;
        padding: 0.5rem;
        border-radius: 50%;
        background: rgba(0,0,0,0.1);
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
        margin: 0.25rem;
        border-radius: 15px;
    }
    
    .btn {
        min-width: auto;
        width: 100%;
        margin: 0.25rem 0;
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
    
    .color-option {
        width: 35px;
        height: 35px;
    }
    
    #gameCanvas {
        max-width: 300px;
        border-radius: 15px;
    }
    
    .word-display {
        padding: 1rem;
        font-size: 1rem;
        min-height: 70px;
    }
    
    .hint-box {
        width: 35px;
        height: 35px;
        font-size: 1.4rem;
    }
    
    .chat-messages {
        max-height: 200px;
        font-size: 0.95rem;
    }
    
    .player {
        padding: 0.75rem;
        font-size: 1rem;
        min-height: 55px;
    }
    
    .game-layout {
        gap: 0.5rem;
    }
    
    .players-panel,
    .game-area,
    .chat-panel {
        padding: 0.5rem;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .game-layout {
        grid-template-columns: 180px 1fr 200px;
        height: calc(100vh - 120px);
    }
    
    .header {
        padding: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .players-panel,
    .chat-panel {
        padding: 0.75rem;
    }
    
    .chat-messages {
        max-height: 150px;
    }
    
    .word-display {
        padding: 1rem;
        margin: 0.5rem 0;
    }
}

/* Touch and gesture optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn:hover,
    .player:hover,
    .word-display:hover,
    .main-content:hover,
    #gameCanvas:hover {
        transform: none;
        box-shadow: initial;
    }
    
    /* Enhance active states instead */
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .player:active {
        background: rgba(255, 107, 53, 0.1);
    }
    
    /* Better touch feedback for interactive elements */
    .color-option:active {
        transform: scale(1.2);
    }
}

/* Enhanced Room Creation and Sharing UI */

/* Room Header Card */
.room-header-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.room-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.6s;
}

.room-header-card:hover::before {
    left: 100%;
}

.room-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.room-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.room-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

.room-details {
    flex: 1;
}

.room-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #FF6B35;
    margin: 0 0 0.5rem 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

/* Enhanced Game Status Badge */
.game-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.game-status-badge.waiting {
    background: linear-gradient(135deg, #FFD23F, #FFA726);
    color: #333;
}

.game-status-badge.in-progress {
    background: linear-gradient(135deg, #06FFA5, #4ECDC4);
    color: white;
    animation: statusPulse 2s ease-in-out infinite;
}

.game-status-badge.finished {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    color: white;
}

.status-icon {
    font-size: 1.1rem;
    animation: statusIconSpin 3s linear infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes statusIconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Room Controls */
.room-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-start-game {
    background: linear-gradient(135deg, #06FFA5, #4ECDC4);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 15px;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(6, 255, 165, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-start-game::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-start-game:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(6, 255, 165, 0.4);
}

.btn-start-game:hover::before {
    left: 100%;
}

.btn-leave-room {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 15px;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.btn-leave-room:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.4);
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-text {
    font-size: 1rem;
}

/* Enhanced Share Section */
.enhanced-share-section {
    margin-top: 2rem;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid rgba(255, 107, 53, 0.2);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
}

.share-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.15);
}

.share-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.share-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.3);
}

.share-title h4 {
    margin: 0 0 0.25rem 0;
    color: #FF6B35;
    font-size: 1.3rem;
    font-weight: bold;
}

.share-title p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.share-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Link Sharing Method */
.share-method {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.share-method:hover {
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
}

.share-link-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.link-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4ECDC4, #45B7AF);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.enhanced-share-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    color: #495057;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.enhanced-share-input:focus {
    outline: none;
    border-color: #FF6B35;
    background: white;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.2);
}

.share-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Enhanced Copy Button */
.btn-copy-enhanced {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-copy-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-copy-enhanced:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-copy-enhanced:hover::before {
    left: 100%;
}

.btn-copy-enhanced.copied {
    background: linear-gradient(135deg, #06FFA5, #4ECDC4);
    animation: copySuccess 0.6s ease-in-out;
}

/* Room Code Display */
.room-code-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.room-code-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

.room-code-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.room-code-value {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.room-code-instruction {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Room Players Section */
.room-players-section {
    margin-top: 2rem;
}

.players-waiting-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.players-waiting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 107, 53, 0.2);
}

.players-waiting-header h4 {
    margin: 0;
    color: #FF6B35;
    font-size: 1.3rem;
    font-weight: bold;
}

.player-count {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

.room-players-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-height: 100px;
}

.room-player-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border: 2px solid rgba(255, 107, 53, 0.2);
    border-radius: 15px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    animation: playerJoinAnimation 0.5s ease-out;
}

.room-player-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
}

.room-player-item.host {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 193, 7, 0.8));
    border-color: rgba(255, 215, 0, 0.6);
}

.room-player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
}

.room-player-info {
    flex: 1;
}

.room-player-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.25rem;
}

.room-player-status {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-player-badges {
    font-size: 1.2rem;
}

.room-status-message {
    text-align: center;
    color: #666;
    font-style: italic;
    background: rgba(255, 107, 53, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border: 1px dashed rgba(255, 107, 53, 0.3);
}

@keyframes playerJoinAnimation {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* QR Code Modal */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.qr-modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.qr-modal-header h3 {
    margin: 0;
    color: #FF6B35;
    font-size: 1.5rem;
}

.qr-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qr-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
}

.qr-loading {
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

.qr-instruction {
    text-align: center;
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mobile Responsiveness for Enhanced UI */
@media (max-width: 768px) {
    .room-header-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .room-title-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .room-badge {
        justify-content: center;
        text-align: center;
    }
    
    .room-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .room-title {
        font-size: 1.5rem;
    }
    
    .room-controls {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .btn-start-game,
    .btn-leave-room {
        flex: 1;
        justify-content: center;
        min-width: 140px;
    }
    
    .share-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .share-actions {
        justify-content: center;
    }
    
    .btn-copy-enhanced {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
    
    .room-code-value {
        font-size: 1.5rem;
    }
    
    .qr-modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .room-header-card {
        padding: 1rem;
    }
    
    .share-card {
        padding: 1rem;
    }
    
    .share-actions {
        flex-direction: column;
    }
    
    .btn-copy-enhanced {
        width: 100%;
    }
    
    .share-link-preview {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .enhanced-share-input {
        width: 100%;
        font-size: 0.8rem;
    }
}

/* Chat System Animations */
@keyframes correctGuessGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
        transform: scale(1);
    }
    25% {
        box-shadow: 0 8px 30px rgba(40, 167, 69, 0.6);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 12px 45px rgba(40, 167, 69, 0.8);
        transform: scale(1.05);
    }
    75% {
        box-shadow: 0 8px 30px rgba(40, 167, 69, 0.6);
        transform: scale(1.02);
    }
}

@keyframes wordRevealPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    25% {
        transform: scale(1.1);
        opacity: 1;
        box-shadow: 0 10px 40px rgba(255, 107, 53, 0.6);
    }
    50% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    }
    75% {
        transform: scale(1.05);
        opacity: 1;
        box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    }
}

/* Mobile Responsive Chat */
@media (max-width: 768px) {
    .chat-panel {
        max-height: 500px;
        border-radius: 15px;
        margin: 0 0.5rem;
    }
    
    .chat-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        min-height: auto;
    }
    
    .chat-title {
        flex: 1;
        min-width: 0;
    }
    
    .chat-title h4 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .chat-status {
        order: 3;
        width: 100%;
    }
    
    .chat-status .online-indicator {
        width: 100%;
        text-align: center;
        max-width: none;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    
    .chat-actions {
        flex-shrink: 0;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
    }
    
    .chat-messages {
        padding: 0.75rem 1rem;
        min-height: 300px;
        max-height: 350px;
    }
    
    .chat-message {
        font-size: 0.9rem;
        padding: 0.5rem 0.875rem;
        max-width: 90%;
    }
    
    .chat-input-container {
        padding: 0.75rem 1rem;
    }
    
    .input-wrapper input {
        padding: 0.75rem 1rem;
        padding-right: 3.5rem;
        font-size: 0.95rem;
    }
    
    .char-counter {
        right: 0.75rem;
        font-size: 0.7rem;
    }
    
    .btn-send {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-width: 100px;
        min-height: 45px;
    }
    
    .voice-controls {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-voice {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .chat-panel {
        max-height: 450px;
        border-radius: 12px;
    }
    
    .chat-header {
        padding: 0.625rem 0.875rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        text-align: center;
    }
    
    .chat-title {
        order: 1;
        width: 100%;
    }
    
    .chat-actions {
        order: 2;
        justify-content: center;
    }
    
    .chat-status {
        order: 3;
        width: 100%;
    }
    
    .chat-status .online-indicator {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .chat-messages {
        min-height: 250px;
        max-height: 300px;
        padding: 0.625rem 0.875rem;
    }
    
    .chat-message {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        max-width: 95%;
    }
    
    .message-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .chat-input-container {
        padding: 0.625rem 0.875rem;
    }
    
    .chat-input {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .input-wrapper {
        width: 100%;
    }
    
    .input-wrapper input {
        padding: 1rem 1.25rem;
        padding-right: 3rem;
        min-height: 45px;
    }
    
    .btn-send {
        width: 100%;
        justify-content: center;
        margin-top: 0;
        min-height: 45px;
        padding: 1rem;
    }
    
    .voice-controls {
        padding: 0.625rem 0.875rem;
        gap: 0.5rem;
    }
    
    .btn-voice {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}