* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.auth-links-header {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.auth-link:hover {
    background: #e8ebfa;
}

.user-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.user-icon {
    font-size: 20px;
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.setup-screen,
.game-screen,
.game-over-screen {
    display: none;
}

.setup-screen.active,
.game-screen.active,
.game-over-screen.active {
    display: block;
}

.setup-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s;
}

button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 15px;
    max-width: 100%;
}

.main-game {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.room-code {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    display: inline-block;
    position: relative;
}

#roomCode.blurred {
    filter: blur(5px);
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: filter 0.3s;
    -webkit-transition: -webkit-filter 0.3s;
    -moz-transition: -moz-filter 0.3s;
    -o-transition: -o-filter 0.3s;
}

#roomCode.blurred:hover {
    filter: blur(3px);
    -webkit-filter: blur(3px);
    -moz-filter: blur(3px);
    -o-filter: blur(3px);
    -ms-filter: blur(3px);
}


.show-code-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s;
    vertical-align: middle;
}

.game-info-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.game-info-left > div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.show-code-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.players-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.players-list h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.round-history {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.round-history h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.history-item {
    padding: 12px;
    margin: 8px 0;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.history-round {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 6px;
    font-size: 13px;
}

.history-cluegiver {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.history-clues {
    font-size: 13px;
    margin-bottom: 8px;
    font-style: italic;
}

.history-color {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.history-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
    font-size: 14px;
}

.player-card {
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 8px;
    border: 2px solid transparent;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-card-info {
    flex: 1;
}

.player-card-actions {
    display: flex;
    gap: 5px;
}

.kick-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.kick-btn:hover {
    background: #cc0000;
    transform: scale(1.05);
}

.player-card.current-cluegiver {
    border-color: #667eea;
    background: #e8ebfa;
}

.player-card.you {
    border-color: #28a745;
    background: #e8f5e9;
}

.player-card.disconnected {
    opacity: 0.5;
}

.player-card.has-guessed::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #28a745;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.player-name {
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 14px;
}

.player-score {
    color: #666;
    font-size: 12px;
}

.chat-panel {
    position: fixed;
    right: 90px; /* Align with chat toggle */
    bottom: 80px; /* Position above the toggle button */
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    width: 350px;
    height: 500px;
    display: flex;
    flex-direction: column;
    border: 2px solid #667eea;
    max-height: calc(100vh - 120px);
}

.chat-toggle {
    position: fixed;
    right: 90px; /* Position left of settings button */
    bottom: 20px;
    background: #667eea;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.chat-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
}

.chat-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #28a745;
}

.chat-message-sender {
    font-weight: bold;
    color: #667eea;
    font-size: 13px;
    margin-bottom: 5px;
}

.chat-message-text {
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-message-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
    display: block;
}

.chat-message-image:hover {
    opacity: 0.9;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.chat-input-container input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    margin: 0;
}

.chat-input-container button {
    padding: 12px 20px;
    margin: 0;
    white-space: nowrap;
}

.close-chat {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    margin: 0;
    color: #999;
}

.close-chat:hover {
    color: #667eea;
    transform: none;
}

.color-grid-container {
    max-width: 95%; /* Increased from 100% to use more horizontal space */
    margin: 15px auto;
    position: relative;
    /* Scale down the entire grid container */
    transform: scale(0.85); /* Increased from 0.75 to make it bigger */
    transform-origin: top center;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    gap: 2px; /* Increased back to 2px for more spacing */
    margin-left: 25px; /* Reduced from 30px */
    margin-top: 25px; /* Reduced from 30px */
}

.column-labels {
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    gap: 2px; /* Increased back to 2px for more spacing */
    margin-left: 25px; /* Reduced from 30px */
    margin-bottom: 3px; /* Reduced from 5px */
    text-align: center;
}

.column-label {
    font-size: 9px; /* Reduced from 11px */
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.row-labels {
    position: absolute;
    left: 0;
    top: 30px; /* Reduced from 35px */
    display: grid;
    grid-template-rows: repeat(16, 1fr);
    gap: 2px; /* Increased back to 2px for more spacing */
    height: calc(100% - 30px); /* Adjusted from 35px */
}

.row-label {
    font-size: 12px; /* Reduced from 14px */
    font-weight: bold;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; /* Reduced from 25px */
}

.color-cell {
    aspect-ratio: 1;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-cell:hover {
    transform: scale(1.2);
    z-index: 10;
    border-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.color-cell.target {
    border: 4px solid black;
    box-shadow: none;
}

.color-cell.guess {
    border: 3px solid blue;
}

.clues-section {
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    background: #fff9e6;
    border-radius: 10px;
}

.clue-input {
    max-width: 300px;
    margin: 10px auto;
}

.clues-display {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin: 15px 0;
}

.phase-message {
    text-align: center;
    font-size: 16px;
    margin: 0;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 10px;
    font-weight: bold;
}

.guess-status {
    font-size: 16px;
    margin: 0;
    color: #666;
}

.results {
    margin-top: 20px;
}

.guess-result {
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error {
    color: red;
    text-align: center;
    margin: 10px 0;
}

.instructions {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.instructions h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.instructions ul {
    margin-left: 20px;
}

.instructions li {
    margin: 5px 0;
}

.game-over-screen {
    text-align: center;
}

.winner-announcement {
    font-size: 3em;
    color: #667eea;
    margin: 30px 0;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.trophy {
    font-size: 5em;
    margin: 20px 0;
    animation: rotate 2s ease-in-out;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg) scale(0);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.leaderboard {
    max-width: 600px;
    margin: 30px auto;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.leaderboard h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: white;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.leaderboard-entry:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-entry.first {
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFAED 100%);
}

.leaderboard-entry.second {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, #F5F5F5 0%, #FAFAFA 100%);
}

.leaderboard-entry.third {
    border-color: #CD7F32;
    background: linear-gradient(135deg, #FFF0E6 0%, #FFF5ED 100%);
}

.leaderboard-rank {
    font-size: 24px;
    font-weight: bold;
    margin-right: 15px;
    min-width: 40px;
}

.leaderboard-name {
    flex-grow: 1;
    font-size: 20px;
    font-weight: bold;
}

.leaderboard-score {
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
}

.medal {
    font-size: 30px;
    margin-left: 10px;
}

.settings-panel {
    position: fixed;
    bottom: 80px; /* Position above the toggle button */
    right: 20px; /* Align with settings toggle */
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 200px;
}

.settings-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.settings-panel h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.volume-control {
    margin: 10px 0;
}

.volume-control label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}

.volume-control input[type="range"] {
    width: 100%;
    margin: 0;
}

.icon-selector {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.icon-option {
    font-size: 24px;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.icon-option:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.icon-option.selected {
    border-color: #28a745;
    background: #e8f5e9;
}

.icon-option.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
}

.close-settings {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    margin: 0;
    color: #999;
}

@media (max-width: 1200px) {
    .game-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        flex-direction: row;
    }

    .players-list {
        flex: 1;
    }

    .chat-panel {
        width: 90%;
        max-width: 400px;
        left: 50%;
        bottom: 20px;
        transform: translateX(-50%);
    }

    .chat-toggle {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-height: 900px) {
    .color-grid-container {
        transform: scale(0.65);
    }
}

@media (max-height: 800px) {
    .color-grid-container {
        transform: scale(0.6);
    }
}

@media (max-height: 700px) {
    .color-grid-container {
        transform: scale(0.55);
    }
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #667eea;
    position: relative;
    overflow: hidden;
}

.notification.success {
    border-left-color: #28a745;
}

.notification.error {
    border-left-color: #ff4444;
}

.notification.warning {
    border-left-color: #ffc107;
}

.notification.info {
    border-left-color: #667eea;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-wrap: break-word;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: #999;
    flex-shrink: 0;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #333;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: shrink 4s linear;
}

.notification.success .notification-progress {
    color: #28a745;
}

.notification.error .notification-progress {
    color: #ff4444;
}

.notification.warning .notification-progress {
    color: #ffc107;
}

.notification.info .notification-progress {
    color: #667eea;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes shrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.notification.removing {
    animation: slideOut 0.3s ease-in forwards;
}

@media (max-width: 768px) {
    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        padding: 14px 16px;
    }
}

.phase-message-container {
       display: flex;
       flex-direction: column;
       gap: 5px;
       justify-content: center;
       text-align: center;
   }

.clues-section {
       margin-bottom: 15px;
   }

.clue-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.clue-popup-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.clue-popup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 80px;
    border-radius: 30px;
    text-align: center;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 80%;
}

.clue-popup-label {
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.clue-popup-text {
    color: white;
    font-size: 72px;
    font-weight: bold;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: glow 2s ease-in-out infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 0 4px 40px rgba(255, 255, 255, 0.5);
    }
}

@keyframes guessPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 20px 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Game Over Buttons */
.game-over-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.game-over-buttons button {
    min-width: 180px;
}

.guess-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.guess-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.guess-modal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    animation: modalSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    min-width: 400px;
}

.guess-modal-header {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 20px;
}

.guess-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.guess-color-preview {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 4px solid #667eea;
}

.guess-position-text {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.guess-type-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.guess-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.guess-modal-buttons button {
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    min-width: 120px;
}

.guess-confirm-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.guess-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.guess-cancel-btn {
    background: #e0e0e0;
    color: #333;
}

.guess-cancel-btn:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

@keyframes modalSlideIn {
    0% {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.color-cell.ripple-1 {
    animation: ripple1 0.8s ease-out;
}

.color-cell.ripple-2 {
    animation: ripple2 1s ease-out;
}

.color-cell.ripple-3 {
    animation: ripple3 1.2s ease-out;
}

@keyframes ripple1 {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ripple2 {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ripple3 {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Pulse effect for the selected cell */
@keyframes guessPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 30px 15px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

@media (max-width: 768px) {
    .guess-modal {
        min-width: 90%;
        padding: 30px 20px;
    }
    
    .guess-color-preview {
        width: 100px;
        height: 100px;
    }
    
    .guess-position-text {
        font-size: 24px;
    }
}