* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.05) 10px, rgba(255,255,255,.05) 20px);
    pointer-events: none;
    z-index: 0;
}

.version-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1000;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    cursor: pointer;
}

.version-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Refresh button removed - caused issues on mobile and PC */

.screen {
    display: none;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

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

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

.container {
    text-align: center;
}

/* Title Styles */
.game-title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    letter-spacing: -2px;
}

.game-title-small {
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.2);
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.title-quiz {
    color: #FFD700;
}

.title-pvp {
    color: #FF6B6B;
}

.subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin: 20px auto;
    max-width: 500px;
}

/* Input Styles */
input[type="text"],
input[type="number"],
input[type="color"] {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="color"] {
    height: 60px;
    cursor: pointer;
    padding: 5px;
}

/* Button Styles */
.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 3px solid #667eea;
}

.btn-large {
    padding: 20px 60px;
    font-size: 1.3rem;
    margin: 10px;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Header */
.header {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.player-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.player-name {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 10px;
    display: inline-block;
}

.points-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    padding: 8px 20px;
    border-radius: 10px;
}

.points-icon {
    font-size: 1.4rem;
}

/* Stats Bar (Active Players & Connection) */
.stats-bar {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.stat-icon {
    font-size: 1.3rem;
}

.stat-value {
    color: #667eea;
}

#activePlayerCount {
    font-weight: 700;
    font-size: 1.1rem;
    color: #764ba2;
}

/* Pulse animation for player count changes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.3s ease-in-out;
}

/* Connection Status */
.connection-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s;
}

.connection-status.connected {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.connection-status.disconnected {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

/* Mode Selection */
.mode-selection {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.mode-selection h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.mode-btn {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.mode-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.mode-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.mode-icon {
    font-size: 2rem;
}

.mode-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.mode-desc {
    font-size: 0.85rem;
    color: #666;
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Searching Animation */
.searching-animation {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.searching-text {
    color: #666;
    margin-top: 10px;
}

.searching-tip {
    color: #667eea;
    margin-top: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(102, 126, 234, 0.1);
    padding: 12px 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid #e0e0e0;
}

.rainbow-avatar {
    animation: rainbow 3s linear infinite;
    border: 4px solid;
}

@keyframes rainbow {
    0% { border-color: #ff0000; }
    16% { border-color: #ff7f00; }
    33% { border-color: #ffff00; }
    50% { border-color: #00ff00; }
    66% { border-color: #0000ff; }
    83% { border-color: #8b00ff; }
    100% { border-color: #ff0000; }
}

.gold-avatar {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 4px solid #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.vs-badge {
    font-size: 1.5rem;
    font-weight: 900;
    color: #FF6B6B;
    background: rgba(255, 107, 107, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
}

/* Progress Bar */
.progress-bar {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.progress-fill {
    height: 20px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

/* Quiz Container */
.quiz-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.question-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-text {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
}

/* Results Screen */
.result-banner {
    font-size: 3rem;
    font-weight: 900;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.result-banner.win {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.result-banner.lose {
    background: linear-gradient(135deg, #FF6B6B, #ee5a6f);
    color: white;
}

.result-banner.draw {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    color: white;
}

.results-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.score-comparison {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.score-box {
    text-align: center;
}

.score-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}

.score-value {
    font-size: 3rem;
    font-weight: 900;
    color: #667eea;
}

.score-divider {
    font-size: 2rem;
    font-weight: 700;
    color: #ccc;
}

.points-earned {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4CAF50;
    margin: 20px 0;
    padding: 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
}

.answers-review {
    margin: 30px 0;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
}

.answer-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
    background: #f5f5f5;
}

.answer-item.correct {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
}

.answer-item.incorrect {
    background: rgba(255, 107, 107, 0.1);
    border-left: 4px solid #FF6B6B;
}

.results-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Shop Screen */
.shop-header {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.shop-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.shop-item:hover {
    transform: translateY(-3px);
}

.shop-item.special {
    border: 3px solid #FFD700;
}

.shop-item.legendary {
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff) border-box;
}

.shop-item.affordable {
    border: 2px solid #4CAF50;
    background: linear-gradient(135deg, #ffffff 0%, #f0fff0 100%);
}

.shop-item.affordable .shop-item-price {
    color: #4CAF50;
    font-weight: 700;
}

.shop-item-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.gold-icon {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rainbow-icon {
    animation: rainbow-bg 3s linear infinite;
}

@keyframes rainbow-bg {
    0% { background: #ff0000; }
    16% { background: #ff7f00; }
    33% { background: #ffff00; }
    50% { background: #00ff00; }
    66% { background: #0000ff; }
    83% { background: #8b00ff; }
    100% { background: #ff0000; }
}

.shop-item-info {
    flex: 1;
    text-align: left;
}

.shop-item-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #333;
}

.shop-item-info p {
    font-size: 0.9rem;
    color: #666;
}

.shop-item-price {
    font-weight: 700;
    color: #FFD700;
    font-size: 1.1rem;
    margin-right: 10px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 10px;
    color: #333;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons .btn {
    flex: 1;
}

.color-preview {
    width: 100%;
    height: 60px;
    border-radius: 10px;
    margin: 15px 0;
    border: 3px solid #e0e0e0;
}

/* Game Timer */
.game-timer {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    text-align: center;
    margin: 20px 0;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: inline-block;
    min-width: 150px;
    transition: all 0.3s;
}

.game-timer.warning {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
    animation: pulse 1s ease-in-out infinite;
}

.game-timer.critical {
    background: rgba(255, 0, 0, 0.4);
    border-color: rgba(255, 0, 0, 0.7);
    animation: pulse 0.5s ease-in-out infinite;
    color: #FFD700;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .game-title {
        font-size: 3rem;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
    }

    .question-text {
        font-size: 2rem;
    }

    .shop-item {
        flex-wrap: wrap;
    }

    .btn {
        width: 100%;
    }
}

/* Mobile Only Mode */
.mobile-only {
    display: none;
}

@media (max-width: 768px), (pointer: coarse) {
    .mobile-only {
        display: flex;
    }
}

/* Who Am I Game Screen */
.landscape-game {
    width: 100vw;
    height: 100vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.whoami-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
}

.whoami-timer {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 30px;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.whoami-score {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 15px;
}

.whoami-word-card {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 100%;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.whoami-word {
    font-size: 4rem;
    font-weight: 900;
    color: #667eea;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.whoami-instructions {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-top: 20px;
}

.tilt-instruction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: #666;
}

.arrow {
    font-size: 3rem;
    font-weight: 900;
}

.arrow.up {
    color: #4CAF50;
}

.arrow.down {
    color: #FF6B6B;
}

.whoami-orientation-warning {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    color: white;
    text-align: center;
    padding: 40px;
}

.whoami-orientation-warning.show {
    display: flex;
}

.warning-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.whoami-turn-info {
    margin-top: 30px;
    text-align: center;
}

.whoami-turn-info div {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 10px 0;
}

@media (orientation: portrait) and (max-width: 768px) {
    #whoAmIScreen .whoami-orientation-warning {
        display: flex !important;
    }

    #whoAmIScreen .whoami-word-card,
    #whoAmIScreen .whoami-header,
    #whoAmIScreen .whoami-turn-info {
        display: none !important;
    }
}

/* ===== CHAT MODE STYLES ===== */

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chat-partner-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-partner-info .player-avatar {
    width: 50px;
    height: 50px;
}

.chat-status {
    color: #10b981;
    font-size: 0.9rem;
    font-weight: 500;
}

.chat-messages {
    background: white;
    border-radius: 15px;
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-welcome {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
    font-size: 1.1rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    animation: messageSlide 0.3s ease;
}

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

.chat-message.mine {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message.theirs {
    align-self: flex-start;
    align-items: flex-start;
}

.message-sender {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.message-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-message.theirs .message-text {
    background: #f0f0f0;
    color: #333;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 5px;
}

/* iOS-friendly chat input area */
.chat-input-area {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 25px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-size: 16px; /* Prevent iOS zoom */
    background: white;
    transition: all 0.3s;
    min-height: 44px; /* iOS touch target size */
}

.chat-input-area input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-send-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.send-icon {
    font-size: 18px;
    display: block;
}

/* Legacy support for old chat-input-container */
.chat-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.chat-input-container input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s;
}

.chat-input-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-actions {
    display: flex;
    justify-content: center;
}

/* Responsive Chat */
@media (max-width: 600px) {
    .chat-messages {
        height: 300px;
    }

    .chat-message {
        max-width: 85%;
    }

    .chat-input-area {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        padding: 10px;
        margin: 0 -20px -20px -20px;
        border-radius: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        gap: 6px;
    }

    .chat-input-area input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 16px 20px;
        min-height: 54px;
        flex: 1;
        width: 100%;
    }

    .chat-send-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .send-icon {
        font-size: 1.2rem;
    }

    /* Legacy container support */
    .chat-input-container input {
        font-size: 16px;
        padding: 16px 20px;
        min-height: 54px;
        flex: 1;
        width: 100%;
    }

    .chat-input-container {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.95);
        padding: 10px;
        margin: 0 -20px -20px -20px;
        border-radius: 0 0 15px 15px;
        display: flex;
        gap: 6px;
        align-items: center;
    }
}

.chat-header-actions {
    display: flex;
    gap: 10px;
}

/* ===== FRIENDS SYSTEM STYLES ===== */

.friends-count {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.friends-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid #e5e7eb;
}

.friends-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    position: relative;
}

.friends-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.friends-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.badge {
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 5px;
}

.friends-content {
    min-height: 300px;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.friend-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.friend-info .player-avatar {
    width: 45px;
    height: 45px;
}

.friend-details {
    display: flex;
    flex-direction: column;
}

.friend-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
}

.friend-status {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 500;
}

.friend-status.offline {
    color: #999;
}

.friend-actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 1.1rem;
    font-style: italic;
}

.friend-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.request-actions {
    display: flex;
    gap: 8px;
}

/* Mobile responsive for friends */
@media (max-width: 600px) {
    .friend-item, .friend-request-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .friend-actions, .request-actions {
        width: 100%;
    }

    .friend-actions button, .request-actions button {
        flex: 1;
    }
}

/* ===== SETTINGS STYLES ===== */

.settings-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.settings-item-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    flex-shrink: 0;
}

.settings-item-info {
    flex: 1;
}

.settings-item-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

.settings-item-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ===== iOS & MOBILE OPTIMIZATIONS ===== */

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    input, textarea, select {
        font-size: 16px !important;
    }

    .btn {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    .player-name, .friend-name, .mode-title {
        -webkit-text-size-adjust: 100%;
    }
}

/* Compact mobile layout */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }

    .header {
        gap: 10px;
    }

    .game-title-small {
        font-size: 2rem;
    }

    .player-info {
        gap: 8px;
    }

    .player-name {
        padding: 8px 15px;
        font-size: 0.95rem;
    }

    .points-display {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .stats-bar {
        padding: 10px;
        gap: 15px;
    }

    .stat-item {
        font-size: 0.85rem;
    }

    .mode-selection h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .mode-buttons {
        gap: 8px;
    }

    .mode-btn {
        padding: 12px;
    }

    .mode-icon {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }

    .mode-title {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }

    .mode-desc {
        font-size: 0.75rem;
    }

    .menu-buttons {
        gap: 8px;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .card {
        padding: 25px;
    }

    .friend-item, .friend-request-item {
        padding: 12px;
    }

    .friend-info .player-avatar {
        width: 40px;
        height: 40px;
    }

    .friend-name {
        font-size: 1rem;
        color: #1a1a1a;
        font-weight: 600;
        word-break: break-word;
    }

    .friend-status {
        font-size: 0.8rem;
        margin-top: 2px;
        color: #10b981;
        font-weight: 600;
    }

    .friend-status.offline {
        color: #6b7280;
    }

    .friends-tabs {
        margin: 15px 0;
    }

    .friends-tab {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .shop-item, .settings-item {
        padding: 15px;
        gap: 12px;
    }

    .shop-item-icon, .settings-item-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .shop-item-info h3, .settings-item-info h3 {
        font-size: 1rem;
        color: #1a1a1a;
    }

    .shop-item-info p, .settings-item-info p {
        font-size: 0.85rem;
        color: #4a4a4a;
    }

    .shop-item-price {
        font-size: 0.95rem;
    }

    .chat-messages {
        height: calc(100vh - 350px);
        min-height: 250px;
        padding: 15px;
    }

    .message-text {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .message-sender {
        font-size: 0.75rem;
    }

    .message-time {
        font-size: 0.65rem;
    }

    .game-header {
        padding: 15px;
        gap: 10px;
    }

    .player-card {
        gap: 8px;
    }

    .player-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    #yourAvatar, #opponentAvatar {
        width: 50px;
        height: 50px;
    }

    .vs-badge {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .game-timer {
        font-size: 1.8rem;
        padding: 12px 25px;
    }

    .question-card {
        padding: 25px;
    }

    .question-text {
        font-size: 2rem;
    }

    .results-card {
        padding: 25px;
    }

    .result-banner {
        font-size: 1.8rem;
        padding: 18px;
    }

    .score-value {
        font-size: 2.5rem;
    }

    .empty-state {
        padding: 40px 15px;
        font-size: 1rem;
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .btn, button {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }

    .friend-name, .player-name, h1, h2, h3 {
        color: #1a1a1a;
        text-shadow: none;
    }

    .chat-status {
        color: #10b981;
        font-weight: 600;
    }

    .chat-status.offline {
        color: #6b7280;
    }
}

@media (max-width: 400px) {
    .mode-buttons {
        grid-template-columns: 1fr;
    }

    .menu-buttons {
        flex-direction: column;
    }

    .btn-secondary, .btn {
        width: 100%;
    }

    .friend-item, .friend-request-item {
        padding: 10px;
    }

    .chat-header {
        padding: 12px;
    }

    .game-title-small {
        font-size: 1.6rem;
    }
}

/* ===== NEW HUB SYSTEM STYLES ===== */

/* ===== NEW HUB DESIGN (v2.9.0) ===== */

/* Menu Header */
.menu-header {
    text-align: center;
    margin-bottom: 40px;
}

.menu-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    letter-spacing: -2px;
}

.player-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin: 0 auto;
    max-width: 500px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.player-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 15px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stat-badge.online {
    background: rgba(76, 175, 80, 0.3);
}

.stat-icon {
    font-size: 1.1rem;
}

/* Hub Grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.hub-card {
    background: white;
    border-radius: 24px;
    padding: 40px 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

.hub-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.hub-card:hover::before {
    opacity: 1;
}

.hub-card:active {
    transform: translateY(-5px) scale(0.98);
}

.hub-card-icon,
.hub-card-title,
.hub-card-desc {
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.hub-card:hover .hub-card-icon,
.hub-card:hover .hub-card-title,
.hub-card:hover .hub-card-desc {
    color: white;
}

.hub-card-icon {
    font-size: 4rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.hub-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}

.hub-card-desc {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

/* Game Type Selection */
.game-type-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.game-type-btn {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: inherit;
}

.game-type-btn:hover:not(.coming-soon) {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.game-type-btn.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-type-icon {
    font-size: 4rem;
}

.game-type-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.game-type-desc {
    font-size: 1rem;
    opacity: 0.8;
}

/* Social Tabs */
.social-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.social-tab {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-tab.active {
    border-bottom-color: white;
    background: rgba(255, 255, 255, 0.1);
}

.social-tab:hover {
    background: rgba(255, 255, 255, 0.15);
}

.tab-icon {
    font-size: 1.3rem;
}

.social-tab-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-height: 300px;
}

.social-description {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.friends-tabs-inner {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

/* Waiting for Results Screen */
.waiting-results-card {
    background: white;
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-top: 50px;
}

.waiting-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

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

.waiting-results-card h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.waiting-results-card p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.game-timer-large {
    font-size: 4rem;
    font-weight: 900;
    color: #667eea;
    margin: 30px 0;
    font-family: 'Courier New', monospace;
}

.game-timer-large.warning {
    color: #f59e0b;
}

.game-timer-large.critical {
    color: #ef4444;
    animation: timerBlink 1s infinite;
}

@keyframes timerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.waiting-instruction {
    font-size: 1rem;
    color: #999;
    margin-bottom: 30px;
}

#viewResultsBtn {
    animation: fadeInUp 0.5s ease;
}

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

/* Mobile optimizations for new screens */
@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hub-card {
        padding: 32px 20px;
    }

    .hub-card-icon {
        font-size: 3rem;
    }

    .hub-card-title {
        font-size: 1.3rem;
    }

    .menu-title {
        font-size: 3rem;
    }

    .hub-desc {
        font-size: 0.85rem;
    }

    .game-type-selection {
        grid-template-columns: 1fr;
    }

    .game-type-btn {
        padding: 30px 20px;
    }

    .game-type-icon {
        font-size: 3rem;
    }

    .game-type-title {
        font-size: 1.2rem;
    }

    .social-tabs {
        flex-direction: column;
        gap: 5px;
    }

    .social-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .social-tab.active {
        border-left-color: #667eea;
        border-bottom-color: transparent;
    }

    .social-tab-content {
        padding: 20px;
    }

    .waiting-results-card {
        padding: 30px 20px;
    }

    .waiting-icon {
        font-size: 3.5rem;
    }

    .game-timer-large {
        font-size: 3rem;
    }

    .waiting-results-card h2 {
        font-size: 1.5rem;
    }
}

/* ===== V3.0 NEW FEATURES ===== */

/* In-App Notification System */
.app-notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 90%;
    transition: top 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.app-notification.show {
    top: 20px;
}

.notification-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.9rem;
    opacity: 0.95;
}

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

/* Friend Request Notification (V3.0) */
.friend-request-notification,
.game-invite-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
}

.friend-request-content,
.game-invite-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.friend-request-icon,
.game-invite-icon {
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

.friend-request-info,
.game-invite-info {
    flex: 1;
}

.friend-request-title,
.game-invite-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 4px;
}

.friend-request-username,
.game-invite-username {
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}

.friend-request-actions,
.game-invite-actions {
    display: flex;
    gap: 10px;
}

.btn-accept {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.btn-accept:hover {
    background: #45a049;
    transform: scale(1.1);
}

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

.btn-reject:hover {
    background: #da190b;
    transform: scale(1.1);
}

.game-invite-actions .btn-accept,
.game-invite-actions .btn-reject {
    border-radius: 8px;
    width: auto;
    padding: 8px 16px;
    font-size: 0.95rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .friend-request-notification,
    .game-invite-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Chat Footer Actions (V3.0 - Fixed Mobile Layout) */
.chat-footer-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: center;
}

.chat-footer-actions button {
    flex: 1;
    max-width: 200px;
}

@media (max-width: 600px) {
    .chat-footer-actions {
        flex-direction: column;
        gap: 8px;
    }

    .chat-footer-actions button {
        max-width: 100%;
        width: 100%;
    }
}

/* Player Count Badge */
.mode-player-count {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.mode-player-count-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Vote Skip Timer UI */
.vote-skip-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.vote-skip-info {
    color: white;
    font-size: 1rem;
    margin-bottom: 12px;
}

.vote-progress {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.vote-progress-bar {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    height: 100%;
    transition: width 0.3s;
}

.vote-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 12px 0;
    font-weight: 500;
}

.vote-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin: 12px 0;
    font-weight: 600;
}

.vote-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

#voteSkipBtn {
    margin: 12px 0;
    font-size: 1.1rem;
    padding: 12px 24px;
    transition: all 0.3s;
}

#voteSkipBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #666;
}

#voteSkipBtn.voted {
    background: #4CAF50;
    cursor: default;
}

/* Shop Item Cards (V3.0 - More Items) */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.shop-item-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.shop-item-card:hover {
    transform: translateY(-4px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.shop-item-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.shop-item-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.shop-item-price {
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
}

.shop-item-owned {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-top: 8px;
    display: inline-block;
}

/* V3.0: Level System Styles */
.player-level {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.level-common {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    color: white;
}

.level-uncommon {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.level-rare {
    background: linear-gradient(135deg, #2196F3, #0D47A1);
    color: white;
}

.level-epic {
    background: linear-gradient(135deg, #9C27B0, #6A1B9A);
    color: white;
    animation: epicGlow 2s infinite;
}

.level-legendary {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
    color: #333;
    animation: legendaryGlow 2s infinite;
    font-size: 0.95rem;
}

@keyframes epicGlow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(156, 39, 176, 0.5);
    }
    50% {
        box-shadow: 0 4px 16px rgba(156, 39, 176, 0.8);
    }
}

@keyframes legendaryGlow {
    0%, 100% {
        box-shadow: 0 2px 12px rgba(255, 215, 0, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.9);
        transform: scale(1.05);
    }
}
