* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FEC868 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.category {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.instruction {
    font-size: 1.1em;
    opacity: 0.9;
}

.game-area {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 30px;
}

/* Category Selection */
.category-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.category-btn {
    background: white;
    border: none;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    gap: 15px;
    align-items: center;
}

.category-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
}

.category-emoji {
    font-size: 2.5em;
}

.category-title {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

/* New Game Area */
.game-area-new {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.current-card-display {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.current-card-display h2 {
    color: #FF6B35;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
}

.current-card {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 15px;
    padding: 40px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card-content {
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.card-content.complete {
    font-size: 2em;
}

.progress {
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 10px;
}

#currentProgress {
    color: #FEC868;
    font-weight: 800;
}

.ranking-zone {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ranking-zone h2 {
    color: #FF6B35;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.ranking-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-slot {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rank-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #FF6B35;
    min-width: 40px;
    text-align: center;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 10px;
    border-radius: 10px;
}

.rank-content {
    flex: 1;
    min-height: 80px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px;
}

.rank-content:hover {
    background: #FFF3E6;
    border-color: #FF6B35;
    transform: scale(1.02);
}

.rank-content.filled {
    border-color: #FF6B35;
    background: white;
    cursor: pointer;
}

.rank-content.filled:hover {
    background: #fff9e6;
}

.placed-item {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
    text-align: center;
    line-height: 1.3;
}

/* Results Display */
.results-display {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto 30px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.result-rank {
    font-size: 2em;
    font-weight: bold;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border-radius: 12px;
}

.result-content {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
    color: #FF6B35;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-area {
        grid-template-columns: 1fr;
    }
    
    .game-area-new {
        grid-template-columns: 1fr;
    }
    
    .current-card-display {
        position: relative;
        top: 0;
    }
    
    .category-selection {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .category {
        font-size: 1.2em;
    }
    
    .instruction {
        font-size: 1em;
    }
    
    .card-content {
        font-size: 1.3em;
    }
    
    .result-content {
        font-size: 1.1em;
    }
}
