* {
    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;
    color: #333;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Menu Screens */
.menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.menu-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
}

.game-title {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Room Code */
.room-code {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    background: #f8f9ff;
    padding: 1rem 2rem;
    border-radius: 15px;
    margin: 1rem 0;
    border: 3px solid #667eea;
    letter-spacing: 3px;
}

.room-code-small {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    background: #f8f9ff;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 2px solid #667eea;
}

/* Code Input */
.code-input {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    border: 3px solid #667eea;
    border-radius: 15px;
    width: 100%;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    color: #667eea;
}

.code-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Player List */
.player-list {
    margin: 1rem 0;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: #f8f9ff;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 2px solid #e9ecef;
}

.player-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.player-status.ready {
    background: #28a745;
    color: white;
}

.player-status.waiting {
    background: #ffc107;
    color: #333;
}

/* Game Screen */
.game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.game-info h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.game-status {
    font-weight: 600;
    color: #666;
}

.game-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Other Players */
.other-players {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-bottom: 1rem;
}

.player-slot {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.player-avatar {
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 0.5rem;
}

.player-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.card-count {
    font-size: 0.9rem;
    color: #666;
}

/* Center Area */
.center-area {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.game-message {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1rem;
}

.pass-area {
    display: none;
}

.pass-instruction {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.pass-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.target-players {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.target-player-btn {
    padding: 0.8rem 1.5rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.target-player-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Player Cards */
.player-cards {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.player-cards h3 {
    color: #667eea;
    margin-bottom: 1rem;
    text-align: center;
}

.cards-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.card {
    width: 80px;
    height: 120px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card.selected {
    border-color: #28a745;
    background: #d4edda;
    transform: translateY(-5px);
}

.card::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: linear-gradient(45deg, #f8f9ff, #e9ecef);
    border-radius: 8px;
    z-index: -1;
}

/* Fruit Colors */
.card.apple { color: #dc3545; }
.card.banana { color: #ffc107; }
.card.orange { color: #fd7e14; }
.card.mango { color: #ff8c00; }

/* Game Over Screen */
.winner-info {
    font-size: 1.5rem;
    color: #28a745;
    margin: 1rem 0;
    font-weight: 600;
}

.final-scores {
    background: #f8f9ff;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }
    
    .menu-content {
        padding: 1.5rem;
    }
    
    .room-code {
        font-size: 2rem;
        padding: 0.8rem 1.5rem;
    }
    
    .other-players {
        flex-direction: column;
        align-items: center;
    }
    
    .player-slot {
        min-width: 200px;
    }
    
    .cards-container {
        gap: 0.5rem;
    }
    
    .card {
        width: 60px;
        height: 90px;
        font-size: 1rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .room-code {
        font-size: 1.5rem;
        padding: 0.6rem 1rem;
    }
    
    .code-input {
        font-size: 1.2rem;
        padding: 0.8rem;
    }
}
