/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Special styling for company name only */
header h1.company-name {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: 2rem;
    color: #8b4513;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    background: linear-gradient(135deg, #8b4513 0%, #cd853f 50%, #8b4513 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#connection-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-connected {
    background: #27ae60;
    color: white;
}

.status-disconnected {
    background: #e74c3c;
    color: white;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Game Portal */
#game-portal h2 {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.game-card {
    position: relative;
    background: white;
    border: none;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.game-card.highlighted {
    border: 3px solid #3498db;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
}

.game-card h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.game-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Coming Soon Game Cards */
.game-card.coming-soon {
    background: 
        repeating-linear-gradient(
            45deg,
            #f1f3f4,
            #f1f3f4 4px,
            #e8eaed 4px,
            #e8eaed 8px
        );
    color: #9aa0a6;
    cursor: not-allowed;
    position: relative;
    opacity: 0.6;
    filter: grayscale(0.3);
}

.game-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.game-card.coming-soon h3 {
    color: #80868b;
}

.game-card.coming-soon p {
    color: #9aa0a6;
}

.coming-soon-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff9500, #ff6b00);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.join-room-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.join-room-section h3 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.join-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.manual-join-section {
    display: flex;
    justify-content: stretch;
}

.manual-join-section .join-method {
    width: 100%;
}

.join-method {
    flex: 1;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.join-method:hover {
    border-color: #3498db;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.join-method.active {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.join-method h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.manual-join {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#room-code-input {
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    text-align: center;
    background: white;
    transition: all 0.2s ease;
}

#room-code-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    transform: scale(1.02);
}

#join-room-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

#join-room-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

#join-room-btn:active {
    transform: translateY(-1px);
}

.active-rooms {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: fit-content;
}

.active-rooms:hover {
    border-color: #3498db;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.15);
}

.active-rooms-header {
    position: relative;
    margin-bottom: 1.2rem;
}

.active-rooms h4 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.refresh-btn {
    position: absolute;
    top: 0;
    right: 8px;
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #8e9297;
    opacity: 0.4;
    border-radius: 3px;
}

.refresh-btn:hover {
    color: #2c3e50;
    opacity: 0.8;
    background: rgba(52, 152, 219, 0.08);
}

.refresh-btn:active {
    transform: scale(0.9);
}

.refresh-btn.refreshing {
    animation: spin 1s linear infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.active-rooms h4::before {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 2px;
}

.rooms-list {
    display: grid;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.rooms-list::-webkit-scrollbar {
    width: 6px;
}

.rooms-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.rooms-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.rooms-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.room-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #27ae60, #219a52);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.room-item:hover {
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.room-item:hover::before {
    transform: scaleX(1);
}

.room-info {
    flex: 1;
}

.room-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}


.room-code {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    background: rgba(52, 152, 219, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 1px;
}

/* CRITICAL: Player emoji display in active rooms - DO NOT REMOVE */
.room-emojis {
    font-size: 1.4rem;
    line-height: 1.5;
    margin: 0.5rem 0;
    letter-spacing: 0.3em;
    min-height: 2rem;
    color: #333;
    font-weight: 500;
}

.room-time {
    font-size: 0.8rem;
    color: #6c757d;
    opacity: 0.8;
}

.join-room-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(39, 174, 96, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.join-room-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(39, 174, 96, 0.4);
}

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

.loading-rooms, .no-rooms {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    background: rgba(108, 117, 125, 0.05);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}


@media (max-width: 768px) {
    .join-room-section {
        padding: 2rem;
    }
    
    .join-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .manual-join-section .join-method {
        max-width: none;
    }
    
    .join-method {
        padding: 1.25rem;
    }
    
    .join-method h4 {
        font-size: 1rem;
    }
    
    .active-rooms h4 {
        font-size: 1.1rem;
    }
    
    .rooms-list {
        max-height: 300px;
    }
    
    .room-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    .join-room-btn {
        width: 100%;
    }
}

/* Game Room */
.room-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.header-left {
    flex: 1;
    min-width: 0;
}

.header-right {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.rules-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    height: 100%;
}

.rules-box h3 {
    color: #2c3e50;
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 0.5rem;
}

#game-rules-content {
    color: #34495e;
    line-height: 1.6;
}

#game-rules-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

#game-rules-content li {
    margin: 0.3rem 0;
}

.room-info h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.room-code {
    color: #7f8c8d;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
}

#leave-room-btn {
    padding: 0.75rem 1.5rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#leave-room-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* game-status div removed from HTML */

/* Player Info Container */
.player-info-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.player-info-container h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.players-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.players-list h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0;
}

/* Game Area - Where specific game modules render */
.game-area {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#start-game-btn-header {
    padding: 0.5rem 1rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#start-game-btn-header:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.player {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.player:last-child {
    border-bottom: none;
}

.player-name {
    color: #2c3e50;
    font-weight: 500;
    flex: 1;
}

.player-symbol {
    color: #7f8c8d;
    font-weight: 600;
    margin-left: 0.5rem;
}

.player-status {
    color: #27ae60;
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

/* Game Boards */
#game-board-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-board {
    color: #7f8c8d;
    font-size: 1.1rem;
    text-align: center;
}

/* Tic Tac Toe Board */
.tic-tac-toe-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 300px;
    margin: 0 auto;
}

.tic-tac-toe-cell {
    width: 80px;
    height: 80px;
    background: #ecf0f1;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tic-tac-toe-cell:hover:not(:disabled) {
    background: #d5dbdb;
    transform: scale(1.05);
}

.tic-tac-toe-cell:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Connect Four Board */
.connect-four-board {
    text-align: center;
}

.connect-four-columns {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.connect-four-column-btn {
    width: 40px;
    height: 40px;
    margin: 0 2px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.connect-four-column-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.connect-four-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    max-width: 350px;
    margin: 0 auto;
}

.connect-four-cell {
    width: 45px;
    height: 45px;
    background: #ecf0f1;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.connect-four-cell.filled {
    background: #e74c3c;
    color: white;
}

/* Rock Paper Scissors Board */
.rock-paper-scissors-board {
    text-align: center;
}

.rock-paper-scissors-board h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.rps-choices {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rps-choice {
    padding: 1rem 2rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.rps-choice:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.rps-results {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.rps-move {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.rps-move:last-child {
    border-bottom: none;
}

/* Generic Board */
.generic-board {
    text-align: center;
}

.generic-board p {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.generic-board pre {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    font-size: 0.9rem;
    color: #495057;
    overflow-x: auto;
}

/* Game Controls */
.game-controls {
    text-align: center;
}

#restart-game-btn {
    padding: 0.75rem 2rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#restart-game-btn:hover {
    background: #219a52;
    transform: translateY(-2px);
}

/* Loading Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Error Messages */
.error-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

.error-message.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .room-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    #room-code-input {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 200px;
    }

    .rps-choices {
        flex-direction: column;
        align-items: center;
    }

    .connect-four-grid {
        max-width: 280px;
    }

    .connect-four-cell {
        width: 35px;
        height: 35px;
    }

    .tic-tac-toe-cell {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .error-message {
        margin: 0 10px;
        max-width: calc(100vw - 40px);
    }
}

/* Button States */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

button:active {
    transform: scale(0.98);
}

/* Focus styles for accessibility */
button:focus,
input:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Drawing Game Styles */
.drawing-controls {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.drawing-tools {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.drawing-tools label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.drawing-tools input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.drawing-tools input[type="range"] {
    width: 100px;
}

#clear-canvas-btn {
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

#clear-canvas-btn:hover {
    background: #c0392b;
}

.word-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
}

.guess-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

#guess-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    max-width: 300px;
}

#guess-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#submit-guess-btn {
    padding: 0.75rem 1.5rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#submit-guess-btn:hover {
    background: #219a52;
}

.game-timer {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #e74c3c;
    margin-top: 1rem;
}

#start-game-btn {
    padding: 0.75rem 2rem;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

#start-game-btn:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.drawing-canvas {
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
    max-width: 100%;
    background: white;
}

.drawing-canvas.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .drawing-tools {
        justify-content: center;
    }
    
    .guess-input {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #guess-input {
        max-width: 100%;
    }
    
    .drawing-canvas {
        max-width: 90vw;
        max-height: 60vh;
    }
}

/* Floating Emoji Animations */
@keyframes move-x {
    0% { transform: translateX(0vw); }
    100% { transform: translateX(90vw); }
}

@keyframes move-x-chaos1 {
    0% { transform: translateX(0vw); }
    25% { transform: translateX(70vw); }
    50% { transform: translateX(20vw); }
    75% { transform: translateX(80vw); }
    100% { transform: translateX(10vw); }
}

@keyframes move-x-chaos2 {
    0% { transform: translateX(0vw); }
    20% { transform: translateX(30vw); }
    40% { transform: translateX(85vw); }
    60% { transform: translateX(15vw); }
    80% { transform: translateX(60vw); }
    100% { transform: translateX(5vw); }
}

@keyframes move-y {
    0% { transform: translateY(0vh); }
    100% { transform: translateY(80vh); }
}

@keyframes move-y-chaos1 {
    0% { transform: translateY(0vh); }
    25% { transform: translateY(60vh); }
    50% { transform: translateY(20vh); }
    75% { transform: translateY(70vh); }
    100% { transform: translateY(10vh); }
}

@keyframes move-y-chaos2 {
    0% { transform: translateY(0vh); }
    20% { transform: translateY(40vh); }
    40% { transform: translateY(75vh); }
    60% { transform: translateY(15vh); }
    80% { transform: translateY(55vh); }
    100% { transform: translateY(5vh); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(5px) rotate(-2deg); }
    75% { transform: translateY(-5px) rotate(1deg); }
}

/* Floating emoji base styles */
.floating-emoji {
    position: fixed !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    user-select: none !important;
    font-size: 4rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3) !important;
}

.floating-emoji-x {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    user-select: none !important;
}

.floating-emoji-y {
    font-size: 4rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3) !important;
}

/* Checkbox Game Styles */
.checkbox-game-ui {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.game-info-container h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
}

.connection-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.connection-info:hover {
    border-color: #3498db;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.15);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

.status-indicator {
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 3px currentColor;
    transition: all 0.3s ease;
}

.status-indicator.connected {
    color: #27ae60;
    animation: pulse-connected 2s ease-in-out infinite;
}

.status-indicator.disconnected {
    color: #e74c3c;
    animation: pulse-disconnected 1.5s ease-in-out infinite;
}

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

@keyframes pulse-disconnected {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.player-count-display {
    color: #495057;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-count-display::before {
    content: "👥";
    font-size: 1.2rem;
}

.checkbox-grid-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid #dee2e6;
    border-radius: 16px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.checkbox-grid:hover {
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.15),
        0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.checkbox-item {
    width: 80px;
    height: 80px;
    background: white;
    border: 3px solid #bdc3c7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3498db, #2980b9);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.checkbox-item:hover:not(.checked) {
    border-color: #3498db;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.checkbox-item:hover:not(.checked)::before {
    opacity: 0.1;
}

.checkbox-item.checked {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    border-color: #219a52;
    transform: scale(1.02);
    box-shadow: 
        0 4px 20px rgba(39, 174, 96, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.checkbox-item.checked .checkbox-icon {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: checkmark-bounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
    position: relative;
}

@keyframes checkmark-bounce {
    0% { 
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% { 
        transform: scale(1.3) rotate(0deg);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.checkbox-item:active {
    transform: scale(0.95);
}

.game-instructions {
    text-align: center;
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 2rem;
}

.game-instructions p {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

/* Mobile Responsive Design for Checkbox Game */
@media (max-width: 768px) {
    .checkbox-game-ui {
        padding: 1.5rem;
        margin: 0 -0.5rem 1.5rem -0.5rem;
    }
    
    .game-info-container h3 {
        font-size: 1.3rem;
    }
    
    .connection-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .checkbox-grid {
        gap: 10px;
        padding: 15px;
    }
    
    .checkbox-item {
        width: 60px;
        height: 60px;
    }
    
    .checkbox-item.checked .checkbox-icon {
        font-size: 2rem;
    }
    
    .game-instructions {
        padding: 1rem;
    }
    
    .game-instructions p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .checkbox-grid {
        gap: 8px;
        padding: 12px;
    }
    
    .checkbox-item {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }
    
    .checkbox-item.checked .checkbox-icon {
        font-size: 1.5rem;
    }
}

/* Emoji Picker Override - Force on top with absolute positioning */
#emoji-picker {
    position: absolute !important;
    z-index: 999999 !important;
    background: white !important;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    padding: 10px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    width: 300px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    top: 40px !important;
    left: 0 !important;
}

/* Smooth transitions */
* {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Checkbox Game Styles */
.checkbox-game-board {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    text-align: center;
}

.checkbox-game-board .game-info h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.checkbox-game-board .game-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.game-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    margin-top: 2rem;
}

.scoreboard {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.scoreboard h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.score-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.score-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.score-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.score-player-emoji {
    font-size: 1.2rem;
}

.score-points {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.1rem;
    background: rgba(39, 174, 96, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 30px;
    text-align: center;
}

/* End Game Screen */
.end-game-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.end-game-content {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: gameEndFadeIn 0.5s ease-out;
    position: relative;
    margin: auto;
}

@keyframes gameEndFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#game-result-message {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0 auto 2rem auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: block;
    width: 100%;
}

.final-scores {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.final-scores h4 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.final-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 1.1rem;
}

.final-score-item:last-child {
    border-bottom: none;
}

.final-score-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #2c3e50;
}

.final-score-emoji {
    font-size: 1.3rem;
}

.final-score-points {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.2rem;
}

.ok-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ok-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
}

.ok-btn:active {
    transform: translateY(-1px);
}

/* Duplicate checkbox styles removed - see lines 1428-1510 for checkbox styling */

/* Name control responsive styles */
.responsive-name-control {
    display: flex;
    gap: 12px;
    align-items: center;
}

.name-input-group {
    display: flex;
    gap: 8px;
    flex: 1;
    align-items: center;
}

.name-input {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    flex: 1;
    font-size: 14px;
    box-sizing: border-box;
}

.update-btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

/* Responsive breakpoint aligned with header wrapping (when "Incorporated" moves to second line) */
@media (max-width: 820px) {
    .responsive-name-control {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .name-label {
        min-width: unset !important;
    }
    
    .name-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .name-input {
        width: 100%;
    }
    
    .update-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px; /* Better touch target */
    }
}

/* Additional mobile-specific adjustments */
@media (max-width: 600px) {
    /* Adjust player controls padding on mobile */
    #player-controls {
        padding-left: 20px !important;
        min-width: unset !important;
    }
    
    /* Stack the Players and Who Are You sections vertically */
    .waiting-room-content > div {
        flex-direction: column !important;
        gap: 30px;
    }
    
    .waiting-room-content > div > .players-list {
        border-right: none !important;
        padding-right: 0 !important;
        border-bottom: 2px solid #e0e0e0;
        padding-bottom: 30px;
    }
    
    .waiting-room-content > div > #player-controls {
        border-left: none !important;
    }
}


/* Mobile responsive styles for new layout */
@media (max-width: 768px) {
    .checkbox-grid {
        max-width: 240px;
        gap: 8px;
    }
    
    .checkbox-item {
        width: 50px;
        height: 50px;
    }
    
    .checkbox-item.checked::after {
        font-size: 20px;
    }
    
    .game-layout {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .scoreboard {
        width: 100%;
        max-width: 300px;
        order: 2;
    }
    
    .checkbox-grid {
        order: 1;
    }
    
    .end-game-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    #game-result-message {
        font-size: 1.5rem;
    }
    
    .final-scores {
        padding: 1rem;
    }
    
    .ok-btn {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

/* Version Info Footer */
.version-info {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

#version-display {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Ensure main content doesn't overlap footer */
main {
    padding-bottom: 3rem;
}

/* Chat Area - Yahoo! Games-style chat interface */
.chat-area {
    background: #e8e8e8;
    border: 2px solid #999;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1.5rem;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-header {
    background: linear-gradient(180deg, #5a9fd4 0%, #3d7fb8 100%);
    color: white;
    padding: 0.4rem 0.75rem;
    border-bottom: 2px solid #2d5a8e;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.chat-header h3 {
    font-size: 0.95rem;
    margin: 0;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.chat-main-container {
    display: flex;
    flex: 1;
    background: white;
    overflow: hidden;
}

.chat-messages-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    background: white;
    font-family: 'Verdana', 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-messages-wrapper {
    margin-top: auto;
}

.chat-message {
    padding: 0.2rem 0;
    margin-bottom: 0.2rem;
    word-wrap: break-word;
    font-size: 0.8rem;
    line-height: 1.3;
}

.chat-author {
    font-weight: bold;
    color: #0066cc;
    margin-right: 0.3rem;
    font-size: 0.8rem;
}

.chat-text {
    color: #000;
    font-size: 0.8rem;
}

.chat-input-area {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem;
    background: #f0f0f0;
    border-top: 1px solid #ccc;
}

.chat-users-panel {
    width: 180px;
    background: #f5f5f5;
    border-left: 2px solid #ccc;
    display: flex;
    flex-direction: column;
}

.chat-users-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.chat-users-section {
    border-bottom: 1px solid #ddd;
}

.chat-users-section:last-child {
    border-bottom: none;
}

.chat-users-header {
    font-size: 0.7rem;
    font-weight: bold;
    color: #444;
    text-transform: uppercase;
    padding: 0.4rem 0.5rem;
    background: linear-gradient(180deg, #e0e0e0 0%, #d0d0d0 100%);
    border-bottom: 1px solid #bbb;
    border-top: 1px solid #fff;
    letter-spacing: 0.5px;
    font-family: 'Verdana', 'Arial', sans-serif;
}

.chat-user-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: 'Verdana', 'Arial', sans-serif;
    transition: background-color 0.15s;
    cursor: default;
}

.chat-user-item:hover {
    background: #d4e4f4;
}

.chat-user-item.spectator {
    font-style: italic;
    opacity: 0.85;
}

.chat-user-emoji {
    margin-right: 0.35rem;
    font-size: 0.85rem;
}

.chat-user-name {
    flex: 1;
    color: #222;
    font-weight: 500;
}

.chat-user-badge {
    margin-left: 0.3rem;
    font-size: 0.75rem;
}

#chat-input {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border: 1px solid #999;
    border-radius: 2px;
    font-size: 0.8rem;
    font-family: 'Verdana', 'Arial', sans-serif;
    background: white;
}

#chat-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: inset 0 0 3px rgba(74, 144, 226, 0.3);
}

#chat-send-btn {
    padding: 0.35rem 0.9rem;
    background: linear-gradient(180deg, #6db3f2 0%, #4a90e2 50%, #3d7fb8 100%);
    color: white;
    border: 1px solid #2d5a8e;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.75rem;
    font-family: 'Verdana', 'Arial', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#chat-send-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #5da2e2 0%, #3a80d2 50%, #2d6fa8 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#chat-send-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}

#chat-send-btn:disabled {
    background: #c0c0c0;
    border-color: #999;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
    text-shadow: none;
}

/* County Game Styles */
.county-game-waiting,
.county-game-submission,
.county-game-announcement {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.county-game-submission h2 {
    color: #333;
    margin-bottom: 1rem;
}

.county-game-submission .timer-display {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    font-weight: 600;
}

.county-game-submission .submission-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.county-game-submission #county-input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin: 1rem 0;
    text-align: center;
}

.county-game-submission #county-input:focus {
    outline: none;
    border-color: #007bff;
}

.county-game-submission .submit-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.county-game-submission .submit-btn:hover {
    background: #218838;
}

.county-game-submission .submission-complete {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #28a745;
}

.county-game-submission .submitted-county {
    font-size: 1.2rem;
    color: #333;
    margin: 1rem 0;
}

.county-game-submission .submission-status {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: #666;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
}

/* County Game Announcement Phase */
.county-game-announcement h2 {
    color: #333;
    margin-bottom: 2rem;
}

.announcement-display {
    background: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin: 2rem auto;
    animation: slideIn 0.5s ease-out;
    max-width: 500px;
    border: 1px solid #e8f0fe;
    text-align: center;
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.announcement-display .player-number {
    font-size: 0.9rem;
    color: #8b92a8;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.announcement-display .player-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.announcement-display .player-emoji {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.announcement-display .player-name {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.announcement-display .county-name {
    font-size: 2.2rem;
    color: #5e72e4;
    font-weight: 700;
    margin-top: 1rem;
    font-style: normal;
    line-height: 1.3;
    word-wrap: break-word;
    padding: 0 1rem;
}

.announcement-waiting {
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
}

.host-controls {
    margin-top: 2rem;
}

.host-controls .control-btn {
    background: #5e72e4;
    color: white;
    border: none;
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(94, 114, 228, 0.25);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.host-controls .control-btn:hover {
    background: #4c63d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 114, 228, 0.35);
}

.host-controls .control-btn:active {
    transform: translateY(0);
}

.host-controls p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}