* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    margin-bottom: 10px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    flex: 1;
    align-items: start;
}

.game-card {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.game-card.coming-soon {
    opacity: 0.7;
}

.game-card.coming-soon:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.game-card.coming-soon::before {
    background: linear-gradient(90deg, #bbb, #999);
}

.game-icon {
    font-size: 36px;
    text-align: center;
    margin-bottom: 10px;
    display: block;
}

.game-info {
    text-align: center;
    margin-bottom: 20px;
    flex: 1;
}

.game-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
}

.game-description {
    font-size: 9px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.3;
}

.game-stats {
    margin-bottom: 12px;
}

.difficulty {
    display: inline-block;
    font-size: 10px;
    color: #667eea;
    font-weight: 500;
}

.play-btn {
    width: 100%;
    height: 35px;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    background: #667eea;
    color: white;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
}

.play-btn:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.play-btn:active:not(:disabled) {
    transform: translateY(0);
}

.play-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.footer {
    text-align: center;
    margin-top: auto;
    padding: 20px 0;
}

.footer-text {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-style: italic;
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.6s ease;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-card {
        padding: 20px;
    }
    
    .game-icon {
        font-size: 40px;
    }
    
    .game-title {
        font-size: 16px;
    }
    
    .game-description {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .difficulty {
        font-size: 10px;
    }
    
    .play-btn {
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 580px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .game-card {
        padding: 15px;
    }
    
    .game-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .game-title {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .game-description {
        font-size: 10px;
        margin-bottom: 8px;
    }
    
    .difficulty {
        font-size: 9px;
    }
    
    .play-btn {
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 28px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .game-card {
        padding: 15px;
    }
    
    .game-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }
    
    .game-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .game-description {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .difficulty {
        font-size: 12px;
    }
    
    .play-btn {
        height: 45px;
        font-size: 16px;
    }
}
    
    .game-description {
        font-size: 13px;
    }
}

@media (max-width: 375px) {
    .container {
        padding: 12px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .games-grid {
        gap: 10px;
    }
    
    .game-card {
        padding: 12px;
    }
    
    .game-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .game-title {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .game-description {
        font-size: 8px;
        margin-bottom: 6px;
    }
    
    .play-btn {
        height: 35px;
        font-size: 13px;
    }
}