            /* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    transition: background 0.5s ease;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Background Theme Classes */
body.bg-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.bg-ocean {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
}

body.bg-sunset {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body.bg-forest {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

body.bg-space {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
}

body.bg-gradient {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.app {
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Start Screen Styles */
.start-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.top-controls {
    position: absolute;
    top: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.left-controls {
    display: flex;
    align-items: center;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.coffee-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-right: 0.5rem;
}

.coffee-btn:hover {
    border-color: #e55a2b;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
    animation: coffeeShake 0.5s ease-in-out;
}

.coffee-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

@keyframes coffeeShake {
    0%, 100% { transform: translateY(-2px) scale(1.05) rotate(0deg); }
    25% { transform: translateY(-2px) scale(1.05) rotate(-2deg); }
    75% { transform: translateY(-2px) scale(1.05) rotate(2deg); }
}

.settings-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.settings-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.language-dropdown {
    position: relative;
}

.language-toggle {
    width: 60px;
    height: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0 0.5rem;
    backdrop-filter: blur(10px);
}

.language-toggle:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.current-flag {
    font-size: 1.4rem;
    line-height: 1;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: #666;
    transition: transform 0.3s ease;
}

.language-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.language-menu.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: linear-gradient(135deg, #f8f9ff, #e6eaff);
    transform: translateX(3px);
}

.language-option.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.language-option.active .lang-name {
    color: white;
    font-weight: 600;
}

.language-option .flag {
    font-size: 1.2rem;
    line-height: 1;
}

.language-option .lang-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

/* Auto language option styling */
.language-option.auto-option {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: 2px solid #4CAF50;
}

.language-option.auto-option .lang-name {
    color: white;
    font-weight: 500;
}

.language-option.auto-option:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    border-color: #45a049;
}

.language-option.auto-option.active {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    border-color: #45a049;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

/* Language separator */
.language-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
    margin: 0.5rem 0;
    opacity: 0.6;
}

/* Language notification styling */
.language-notification {
    animation: slideInRight 0.3s ease;
}

.language-notification.auto-detected {
    background: #2196F3 !important;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.game-title {
    font-size: 4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.difficulty-selector h3 {
    color: #555;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.player-count-selector {
    margin-bottom: 2rem;
}

.player-count-selector h3 {
    color: #555;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.player-count-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.player-count-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.player-count-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.player-count-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.player-count-number {
    display: block;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.player-count-desc {
    font-size: 0.8rem;
    opacity: 0.8;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.difficulty-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.difficulty-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.difficulty-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.difficulty-name {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.difficulty-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

.start-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    min-height: 48px;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.start-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rules-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid #e0e0e0;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.rules-btn:hover {
    background: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Game Screen Styles */
#gameScreen {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    height: 100vh;
    justify-content: space-between;
    position: relative;
    overflow-y: auto;
    min-height: 100vh;
}

.restart-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.restart-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
    background: linear-gradient(135deg, #e53935, #c62828);
}

.restart-button:active {
    transform: scale(0.95);
}

.restart-icon {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    user-select: none;
}

.coffee-button-game {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.coffee-button-game:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    background: linear-gradient(135deg, #e55a2b, #e8831a);
    animation: coffeeGameShake 0.6s ease-in-out;
}

.coffee-button-game:active {
    transform: scale(0.95);
}

.coffee-game-icon {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    user-select: none;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

@keyframes coffeeGameShake {
    0%, 100% { transform: scale(1.1) rotate(0deg); }
    16% { transform: scale(1.1) rotate(-3deg); }
    33% { transform: scale(1.1) rotate(3deg); }
    50% { transform: scale(1.1) rotate(-2deg); }
    66% { transform: scale(1.1) rotate(2deg); }
    83% { transform: scale(1.1) rotate(-1deg); }
}

.rules-button-game {
    position: absolute;
    top: 1rem;
    right: 4.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rules-button-game:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
    background: linear-gradient(135deg, #1e88e5, #1565c0);
}

.rules-button-game:active {
    transform: scale(0.95);
}

.rules-icon {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    user-select: none;
}

.players-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    min-height: 120px;
    flex-shrink: 0;
    padding: 0.5rem 0;
}

.computer-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    min-width: 150px;
    transition: all 0.3s ease;
}

.computer-player.active {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    transform: scale(1.05);
}

.player-info {
    text-align: center;
    min-width: 120px;
}

.player-info h3 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.computer-player.active .player-info h3 {
    color: white;
}

.card-count {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.cards-text {
    font-size: 0.8rem;
    opacity: 0.9;
}

.game-center-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.deck-area {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.draw-pile, .discard-pile {
    width: 100px;
    height: 140px;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}

.card-back {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 10px;
    border: 3px solid #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.card-back::after {
    content: "UNO";
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.empty-pile {
    width: 100%;
    height: 100%;
    border: 3px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.empty-pile span {
    color: #999;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.empty-pile:hover {
    border-color: #999;
}

.empty-pile:hover span {
    color: #666;
}

.current-color-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-text {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.color-display {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.color-display.red { background: linear-gradient(135deg, #f44336, #d32f2f); }
.color-display.blue { background: linear-gradient(135deg, #2196f3, #1976d2); }
.color-display.green { background: linear-gradient(135deg, #4caf50, #388e3c); }
.color-display.yellow { background: linear-gradient(135deg, #ffeb3b, #f57f17); }

.current-turn {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.computer-cards {
    display: flex;
    justify-content: center;
    gap: -8px;
    margin: 0.5rem 0;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.computer-card {
    width: 50px;
    height: 70px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 6px;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-left: -8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.6rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    min-width: 40px;
}

.computer-card:first-child {
    margin-left: 0;
}

.computer-card::after {
    content: "UNO";
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid #e0e0e0;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.action-btn:hover:not(:disabled) {
    background: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.uno-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-color: #ff6b6b;
}

.uno-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
}

.player-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    max-width: 100%;
    overflow-x: auto;
    min-height: 130px;
    align-items: center;
}

/* Card Styles */
.card {
    width: 80px;
    height: 112px;
    border-radius: 8px;
    border: 3px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.card.playable {
    border-color: #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.card.playable:hover {
    border-color: #66bb6a;
}

/* Card Colors - Base styles for card faces */
.card.red { background: linear-gradient(135deg, #f44336, #d32f2f); }
.card.blue { background: linear-gradient(135deg, #2196f3, #1976d2); }
.card.green { background: linear-gradient(135deg, #4caf50, #388e3c); }
.card.yellow { background: linear-gradient(135deg, #ffeb3b, #f57f17); color: #333; }

.card.wild {
    background: linear-gradient(45deg, #f44336 25%, #2196f3 25% 50%, #4caf50 50% 75%, #ffeb3b 75%);
}

.card.wild-draw-four {
    background: linear-gradient(45deg, #f44336 25%, #2196f3 25% 50%, #4caf50 50% 75%, #ffeb3b 75%);
    border-color: #333;
}

/* Card Back - Apply themes to card backs */
.card-back {
    width: 100%;
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 2px solid #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}



/* Computer cards should also use the theme */
.computer-card {
    width: 60px;
    height: 84px;
    border-radius: 6px;
    border: 2px solid #fff;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-left: -15px;
    transition: transform 0.3s ease;
}



/* Theme-specific card back content styles */
.card-back-classic .uno-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ecf0f1;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-back-minecraft .pickaxe {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.card-back-minecraft .uno-text {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-back-mario .mushroom {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.card-back-mario .uno-text {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-back-pokemon .pokeball {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.card-back-pokemon .uno-text {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-back-cyberpunk .skull {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.card-back-cyberpunk .uno-text {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-back-retro .alien {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.card-back-retro .uno-text {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: #ecf0f1;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.card-type {
    font-size: 0.7rem;
    margin-top: 0.2rem;
    opacity: 0.9;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 1rem;
}

.modal-content h3 {
    color: #555;
    margin-bottom: 1.5rem;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.color-btn {
    width: 80px;
    height: 80px;
    border: 3px solid #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.color-btn.red { background: linear-gradient(135deg, #f44336, #d32f2f); }
.color-btn.blue { background: linear-gradient(135deg, #2196f3, #1976d2); }
.color-btn.green { background: linear-gradient(135deg, #4caf50, #388e3c); }
.color-btn.yellow { background: linear-gradient(135deg, #ffeb3b, #f57f17); }

/* Rules Modal Styles */
.rules-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    width: 95%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close-btn {
    background: #f44336;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.rules-content {
    text-align: left;
}

.rules-section {
    margin-bottom: 1.5rem;
}

.rules-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rules-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.rules-section ol {
    color: #555;
    padding-left: 1.5rem;
    line-height: 1.8;
}

.rules-section li {
    margin-bottom: 0.3rem;
}

.card-types {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.card-type {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.card-example {
    width: 60px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.card-example.number {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.card-example.action {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.card-example.wild {
    background: linear-gradient(45deg, #f44336 25%, #2196f3 25% 50%, #4caf50 50% 75%, #ffeb3b 75%);
}

.card-type div {
    flex: 1;
}

.card-type strong {
    color: #333;
    display: block;
    margin-bottom: 0.3rem;
}

.card-type p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Settings Modal Styles */
.settings-modal-content {
    max-width: 500px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
}

.settings-content {
    text-align: left;
}

.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.background-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.background-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.background-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.background-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.bg-preview {
    width: 80px;
    height: 50px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.background-option.active .bg-preview {
    border-color: white;
}

.background-option span {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* Background Themes */
.bg-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-ocean {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
}

.bg-sunset {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-forest {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.bg-space {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
}

.bg-gradient {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
}

/* Animations */
@keyframes cardDeal {
    from {
        opacity: 0;
        transform: translateY(-50px) rotate(180deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

.card.dealing {
    animation: cardDeal 0.5s ease-out;
}

@keyframes cardPlay {
    from {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    to {
        transform: scale(1) rotate(0deg);
    }
}

.card.playing {
    animation: cardPlay 0.6s ease-out;
}

/* Responsive Design */
/* Tablet styles (768px to 1024px) */
@media (max-width: 1024px) {
    .start-container {
        padding: 2.5rem;
        max-width: 600px;
    }
    
    .game-title {
        font-size: 3.5rem;
        margin-bottom: 1.5rem;
    }
    
    .player-count-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .players-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .computer-player {
        min-width: 130px;
    }
    
    .deck-area {
        gap: 1.5rem;
    }
}

/* Mobile styles (768px and below) */
@media (max-width: 768px) {
    .start-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
        max-width: none;
    }
    
    .top-controls {
        position: relative;
        margin-bottom: 1rem;
        padding: 0;
    }
    
    .coffee-btn {
        width: 40px;
        height: 40px;
    }
    
    .coffee-icon {
        font-size: 1.3rem;
    }
    
    .settings-btn {
        width: 40px;
        height: 40px;
    }
    
    .settings-icon {
        font-size: 1.3rem;
    }
    
    .language-toggle {
        width: 55px;
        height: 40px;
        padding: 0 0.3rem;
    }
    
    .current-flag {
        font-size: 1.2rem;
    }
    
    .dropdown-arrow {
        font-size: 0.6rem;
    }
    
    .language-menu {
        min-width: 140px;
        top: 45px;
    }
    
    .language-option {
        padding: 0.6rem 0.8rem;
        gap: 0.6rem;
    }
    
    .language-option .flag {
        font-size: 1rem;
    }
    
    .language-option .lang-name {
        font-size: 0.8rem;
    }
    
    .game-title {
        font-size: 3rem;
        margin-bottom: 1.5rem;
        margin-top: 0.5rem;
    }
    
    .player-count-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .player-count-btn {
        min-width: auto;
        width: 100%;
    }
    
    .difficulty-buttons {
        gap: 0.8rem;
    }
    
    .difficulty-btn {
        padding: 0.8rem;
    }
    
    /* Game Screen Mobile Styles */
    #gameScreen {
        padding: 0.5rem;
        gap: 0.6rem;
        min-height: 100vh;
        justify-content: flex-start;
        overflow-y: auto;
    }
    
    .coffee-button-game {
        width: 45px;
        height: 45px;
        top: 0.8rem;
        left: 0.8rem;
    }
    
    .coffee-game-icon {
        font-size: 1.5rem;
    }
    
    .restart-button {
        width: 45px;
        height: 45px;
        top: 0.8rem;
        right: 0.8rem;
    }
    
    .restart-icon {
        font-size: 1.3rem;
    }
    
    .rules-button-game {
        width: 45px;
        height: 45px;
        top: 0.8rem;
        right: 4rem;
    }
    
    .rules-icon {
        font-size: 1.5rem;
    }
    
    .players-container {
        flex-direction: column;
        gap: 0.5rem;
        min-height: auto;
        align-items: center;
        padding: 0.5rem 0;
        margin-top: 0;
        flex-shrink: 0;
    }
    
    .computer-player {
        min-width: auto;
        width: 100%;
        max-width: 280px;
        padding: 0.6rem 0.8rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin: 0 auto;
    }
    
    .game-center-area {
        padding: 0.8rem;
        gap: 0.6rem;
        margin: 0.5rem 0;
        flex-shrink: 0;
    }
    
    .deck-area {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .draw-pile, .discard-pile {
        width: 75px;
        height: 105px;
    }
    
    .current-color-indicator {
        padding: 0.6rem 1rem;
        gap: 0.6rem;
    }
    
    .color-text {
        font-size: 0.8rem;
    }
    
    .color-display {
        width: 25px;
        height: 25px;
    }
    
    .current-turn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .game-actions {
        flex-wrap: wrap;
        gap: 0.6rem;
        justify-content: center;
        margin: 0.5rem 0;
        flex-shrink: 0;
    }
    
    .action-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-width: 100px;
        min-height: 40px;
    }
    
    .player-cards {
        gap: 4px;
        padding: 0.6rem;
        margin-top: auto;
        min-height: 100px;
        max-height: 25vh;
        overflow-x: auto;
        overflow-y: visible;
        flex-shrink: 0;
        justify-content: flex-start;
    }
    
    .card {
        width: 55px;
        height: 77px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }
    
    .card-value {
        font-size: 1.1rem;
    }
    
    .card-type {
        font-size: 0.5rem;
    }
}

@media (max-width: 768px) {
    .rules-modal-content {
        max-height: 90vh;
        padding: 1.5rem;
    }
    
    .settings-modal-content {
        max-height: 90vh;
        width: 98%;
        padding: 1.5rem;
    }
    
    .card-type {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .card-example {
        width: 50px;
        height: 65px;
        font-size: 0.8rem;
    }
}

/* Small mobile styles (480px and below) */
@media (max-width: 480px) {
    .start-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .settings-modal-content {
        max-height: 95vh;
        width: 98%;
        padding: 1rem;
    }
    
    .settings-section {
        margin-bottom: 1rem;
    }
    
    .settings-section h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .top-controls {
        margin-bottom: 0.8rem;
    }
    
    .coffee-btn {
        width: 35px;
        height: 35px;
    }
    
    .coffee-icon {
        font-size: 1.2rem;
    }
    
    .settings-btn {
        width: 35px;
        height: 35px;
    }
    
    .settings-icon {
        font-size: 1.2rem;
    }
    
    .language-toggle {
        width: 50px;
        height: 35px;
        padding: 0 0.2rem;
    }
    
    .current-flag {
        font-size: 1rem;
    }
    
    .dropdown-arrow {
        font-size: 0.5rem;
    }
    
    .language-menu {
        min-width: 120px;
        top: 40px;
    }
    
    .language-option {
        padding: 0.5rem 0.6rem;
        gap: 0.5rem;
    }
    
    .language-option .flag {
        font-size: 0.9rem;
    }
    
    .language-option .lang-name {
        font-size: 0.7rem;
    }
    
    .game-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .player-count-buttons {
        gap: 0.6rem;
    }
    
    .difficulty-buttons {
        gap: 0.6rem;
    }
    
    .difficulty-btn {
        padding: 0.7rem;
    }
    
    .difficulty-name {
        font-size: 1rem;
    }
    
    .difficulty-desc {
        font-size: 0.8rem;
    }
    
    /* Game Screen Small Mobile */
    #gameScreen {
        padding: 0.4rem;
        gap: 0.5rem;
        min-height: 100vh;
        justify-content: flex-start;
        overflow-y: auto;
    }
    
    .coffee-button-game {
        width: 40px;
        height: 40px;
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .coffee-game-icon {
        font-size: 1.3rem;
    }
    
    .restart-button {
        width: 40px;
        height: 40px;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .restart-icon {
        font-size: 1.1rem;
    }
    
    .rules-button-game {
        width: 40px;
        height: 40px;
        top: 0.5rem;
        right: 3.5rem;
    }
    
    .rules-icon {
        font-size: 1.3rem;
    }
    
    .computer-player {
        padding: 0.5rem;
        gap: 0.4rem;
        width: 100%;
        max-width: 260px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin: 0 auto;
    }
    
    .player-info h3 {
        font-size: 0.9rem;
    }
    
    .card-count {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .game-center-area {
        padding: 0.6rem;
        gap: 0.5rem;
        margin: 0.3rem 0;
        flex-shrink: 0;
    }
    
    .deck-area {
        gap: 0.8rem;
    }
    
    .draw-pile, .discard-pile {
        width: 70px;
        height: 98px;
    }
    
    .current-color-indicator {
        padding: 0.5rem 0.8rem;
        gap: 0.5rem;
    }
    
    .color-text {
        font-size: 0.7rem;
    }
    
    .color-display {
        width: 20px;
        height: 20px;
    }
    
    .current-turn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .action-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .player-cards {
        gap: 3px;
        padding: 0.5rem;
        margin-top: auto;
        min-height: 85px;
        max-height: 22vh;
        overflow-x: auto;
        overflow-y: visible;
        flex-shrink: 0;
        justify-content: flex-start;
    }
    
    .card {
        width: 50px;
        height: 70px;
        font-size: 0.8rem;
    }
    
    .card-value {
        font-size: 1.1rem;
    }
    
    .card-type {
        font-size: 0.5rem;
    }
    
    .computer-card {
        width: 30px;
        height: 42px;
        margin-left: -4px;
        font-size: 0.4rem;
    }
    
    /* Modal adjustments for small screens */
    .modal-content {
        padding: 1.5rem 1rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .background-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .background-option {
        padding: 0.6rem;
    }
    
    .bg-preview {
        width: 60px;
        height: 40px;
    }
    
    .rules-modal-content {
        max-height: 95vh;
        padding: 1rem;
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .rules-section h3 {
        font-size: 1.1rem;
    }
    
    .card-type {
        padding: 0.6rem;
    }
    
    .card-example {
        width: 40px;
        height: 56px;
        font-size: 0.6rem;
    }
}

/* Landscape orientation optimizations */
@media (max-height: 600px) and (orientation: landscape) {
    .start-container {
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .game-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .player-count-buttons {
        flex-direction: row;
        gap: 0.8rem;
    }
    
    .player-count-btn {
        min-width: 100px;
        padding: 0.8rem 0.5rem;
    }
    
    .difficulty-buttons {
        gap: 0.6rem;
    }
    
    .difficulty-btn {
        padding: 0.6rem 0.8rem;
    }
    
    #gameScreen {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .players-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        min-height: 80px;
    }
    
    .computer-player {
        min-width: 120px;
        max-width: 180px;
        padding: 0.5rem;
        flex-direction: column;
    }
    
    .game-center-area {
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .current-color-indicator {
        padding: 0.4rem 0.8rem;
    }
    
    .current-turn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .player-cards {
        min-height: 90px;
        padding: 0.5rem;
    }
    
    .card {
        width: 45px;
        height: 63px;
        font-size: 0.7rem;
    }
    
    .card-value {
        font-size: 1rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .start-container {
        padding: 1rem 0.8rem;
        margin: 0.3rem;
        width: calc(100% - 0.6rem);
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .coffee-btn, .settings-btn {
        width: 32px;
        height: 32px;
    }
    
    .coffee-icon, .settings-icon {
        font-size: 1.1rem;
    }
    
    .language-toggle {
        width: 45px;
        height: 32px;
    }
    
    .current-flag {
        font-size: 0.9rem;
    }
    
    .player-count-btn {
        padding: 0.6rem;
    }
    
    .player-count-number {
        font-size: 1.3rem;
    }
    
    .player-count-desc {
        font-size: 0.7rem;
    }
    
    #gameScreen {
        padding: 0.3rem;
    }
    
    .coffee-button-game, .restart-button, .rules-button-game {
        width: 38px;
        height: 38px;
        top: 0.3rem;
    }
    
    .coffee-button-game {
        left: 0.3rem;
    }
    
    .restart-button {
        right: 0.3rem;
    }
    
    .rules-button-game {
        right: 3.2rem;
    }
    
    .draw-pile, .discard-pile {
        width: 60px;
        height: 84px;
    }
    
    .card {
        width: 42px;
        height: 59px;
        font-size: 0.7rem;
    }
    
    .card-value {
        font-size: 1rem;
    }
    
    .computer-card {
        width: 30px;
        height: 42px;
        margin-left: -4px;
    }
}


/* Computer Cards Responsive Fixes */
@media (max-width: 1024px) {
    .computer-cards {
        max-width: 120px;
        justify-content: flex-start;
    }
    
    .computer-card {
        width: 40px;
        height: 56px;
        margin-left: -6px;
        font-size: 0.5rem;
    }
    
    .computer-card:first-child {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .computer-cards {
        max-width: 100px;
        justify-content: flex-start;
        overflow: hidden;
    }
    
    .computer-card {
        width: 32px;
        height: 45px;
        margin-left: -5px;
        font-size: 0.45rem;
        min-width: 28px;
    }
    
    .computer-card:first-child {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .computer-cards {
        max-width: 85px;
        justify-content: flex-start;
        overflow: hidden;
    }
    
    .computer-card {
        width: 28px;
        height: 39px;
        margin-left: -4px;
        font-size: 0.4rem;
        min-width: 24px;
    }
    
    .computer-card:first-child {
        margin-left: 0;
    }
}

@media (max-width: 360px) {
    .computer-cards {
        max-width: 75px;
        justify-content: flex-start;
        overflow: hidden;
    }
    
    .computer-card {
        width: 25px;
        height: 35px;
        margin-left: -3px;
        font-size: 0.35rem;
        min-width: 22px;
    }
    
    .computer-card:first-child {
        margin-left: 0;
    }
}

.settings-button-game {
    position: absolute;
    top: 1rem;
    right: 8rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9c27b0, #673ab7);
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-button-game:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.5);
    background: linear-gradient(135deg, #8e24aa, #5e35b1);
}

.settings-button-game:active {
    transform: scale(0.95);
}

.settings-game-icon {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    user-select: none;
}


/* Settings Button Game Responsive Styles */
@media (max-width: 768px) {
    .settings-button-game {
        width: 45px;
        height: 45px;
        top: 0.8rem;
        right: 7.5rem;
    }
    
    .settings-game-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .settings-button-game {
        width: 40px;
        height: 40px;
        top: 0.5rem;
        right: 7rem;
    }
    
    .settings-game-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .settings-button-game {
        width: 38px;
        height: 38px;
        top: 0.3rem;
        right: 6.5rem;
    }
    
    .settings-game-icon {
        font-size: 1.3rem;
    }
}

/* ===== SKILL DISPLAY STYLES ===== */
.skill-display {
    position: absolute;
    top: 1rem;
    left: 5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    min-width: 280px;
    max-width: 320px;
    z-index: 100;
    transition: all 0.3s ease;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    border-radius: 12px 12px 0 0;
    color: white;
    cursor: pointer;
    user-select: none;
}

.skill-header:hover {
    background: linear-gradient(135deg, #45a049, #388e3c);
}

#skillTitle {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.skill-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.skill-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.skill-toggle.collapsed {
    transform: rotate(-90deg);
}

.skill-content {
    padding: 16px;
    max-height: 400px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.skill-content.collapsed {
    max-height: 0;
    padding: 0 16px;
}

.skill-level {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#skillLevelText {
    font-size: 16px;
    font-weight: 700;
    color: #2e7d32;
}

.skill-level-name {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.skill-xp {
    margin-bottom: 16px;
}

.xp-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.xp-progress {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

#skillXP {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.skill-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.stat-row span:first-child {
    color: #666;
    font-weight: 500;
}

.stat-row span:last-child {
    color: #333;
    font-weight: 600;
}

/* Skill Display Responsive Styles */
@media (max-width: 1024px) {
    .skill-display {
        position: relative;
        top: 0;
        left: 0;
        margin: 4rem auto 0.5rem auto;
        min-width: 220px;
        max-width: 250px;
        width: calc(100% - 2rem);
    }
    
    #skillTitle {
        font-size: 12px;
    }
    
    .skill-header {
        padding: 10px 14px;
    }
    
    .skill-content {
        padding: 10px;
    }
    
    .skill-level {
        margin-bottom: 8px;
    }
    
    #skillLevelText {
        font-size: 14px;
    }
    
    .skill-level-name {
        font-size: 11px;
        padding: 2px 7px;
    }
    
    .skill-xp {
        margin-bottom: 8px;
    }
    
    #skillXP {
        font-size: 11px;
    }
    
    .xp-bar {
        height: 8px;
        margin-bottom: 5px;
    }
    
    .stat-row {
        font-size: 11px;
        margin-bottom: 3px;
    }
}

@media (max-width: 768px) {
    .skill-display {
        position: relative;
        top: 0;
        left: 0;
        margin: 4rem auto 0.5rem auto;
        min-width: 200px;
        max-width: 220px;
        width: calc(100% - 2rem);
    }
    
    #skillTitle {
        font-size: 11px;
    }
    
    .skill-header {
        padding: 8px 12px;
    }
    
    .skill-content {
        padding: 8px;
    }
    
    .skill-level {
        margin-bottom: 6px;
    }
    
    #skillLevelText {
        font-size: 12px;
    }
    
    .skill-level-name {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .skill-xp {
        margin-bottom: 6px;
    }
    
    #skillXP {
        font-size: 10px;
    }
    
    .xp-bar {
        height: 6px;
        margin-bottom: 4px;
    }
    
    .stat-row {
        font-size: 10px;
        margin-bottom: 2px;
    }
}

@media (max-width: 480px) {
    .skill-display {
        position: relative;
        top: 0;
        left: 0;
        margin: 3.5rem auto 0.5rem auto;
        min-width: 180px;
        max-width: 200px;
        width: calc(100% - 2rem);
    }
    
    #skillTitle {
        font-size: 10px;
    }
    
    .skill-header {
        padding: 6px 10px;
    }
    
    .skill-content {
        padding: 6px;
    }
    
    .skill-level {
        margin-bottom: 4px;
    }
    
    #skillLevelText {
        font-size: 11px;
    }
    
    .skill-level-name {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .skill-xp {
        margin-bottom: 4px;
    }
    
    #skillXP {
        font-size: 9px;
    }
    
    .xp-bar {
        height: 4px;
        margin-bottom: 3px;
    }
    
    .stat-row {
        font-size: 9px;
        margin-bottom: 1px;
    }
}

@media (max-width: 360px) {
    .skill-display {
        position: relative;
        top: 0;
        left: 0;
        margin: 3rem auto 0.5rem auto;
        min-width: 160px;
        max-width: 180px;
        width: calc(100% - 2rem);
    }
    
    #skillTitle {
        font-size: 9px;
    }
    
    .skill-header {
        padding: 5px 8px;
    }
    
    .skill-content {
        padding: 5px;
    }
    
    .skill-level {
        margin-bottom: 3px;
    }
    
    #skillLevelText {
        font-size: 10px;
    }
    
    .skill-level-name {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .skill-xp {
        margin-bottom: 3px;
    }
    
    #skillXP {
        font-size: 8px;
    }
    
    .xp-bar {
        height: 3px;
        margin-bottom: 2px;
    }
    
    .stat-row {
        font-size: 8px;
        margin-bottom: 1px;
    }
}

/* Landscape tablet/mobile specific - targeting height constraints */
@media (max-width: 1024px) and (max-height: 700px) {
    .skill-display {
        position: relative;
        top: 0;
        left: 0;
        margin: 3rem auto 0.3rem auto;
        min-width: 180px;
        max-width: 200px;
        width: calc(100% - 3rem);
    }
    
    #skillTitle {
        font-size: 10px;
    }
    
    .skill-header {
        padding: 6px 10px;
    }
    
    .skill-content {
        padding: 6px;
    }
    
    .skill-level {
        margin-bottom: 4px;
    }
    
    #skillLevelText {
        font-size: 11px;
    }
    
    .skill-level-name {
        font-size: 9px;
        padding: 1px 5px;
    }
    
    .skill-xp {
        margin-bottom: 4px;
    }
    
    #skillXP {
        font-size: 9px;
    }
    
    .xp-bar {
        height: 5px;
        margin-bottom: 3px;
    }
    
    .stat-row {
        font-size: 9px;
        margin-bottom: 2px;
    }
}

/* ===== COMPUTER SPEED SETTINGS STYLES ===== */
.speed-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.speed-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.02);
    user-select: none;
}

.speed-option:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.speed-option.active {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.speed-preview {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.speed-option:hover .speed-preview {
    transform: scale(1.1);
}

.speed-option.active .speed-preview {
    transform: scale(1.15);
}

.speed-option span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    text-align: center;
}

.speed-option.active span {
    color: #2e7d32;
    font-weight: 600;
}

/* Speed Options Responsive */
@media (max-width: 768px) {
    .speed-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .speed-option {
        padding: 0.8rem;
    }
    
    .speed-preview {
        font-size: 1.8rem;
    }
    
    .speed-option span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .speed-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .speed-option {
        padding: 0.6rem;
    }
    
    .speed-preview {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }
    
    .speed-option span {
        font-size: 0.75rem;
    }
}


