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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #495057;
}

.controls {
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

.design-link {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-left: 10px;
}

.design-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    text-decoration: none;
    color: white;
}

.game-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

#gameCanvas {
    border: 2px solid #495057;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

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

.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.instructions h3 {
    color: #495057;
    margin-bottom: 15px;
}

.instructions p {
    color: #6c757d;
    margin-bottom: 8px;
    font-size: 14px;
}

.preview-section {
    margin-top: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    text-align: center;
}

.preview-section h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
}

#previewCanvas {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: white;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#previewText {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
    font-style: italic;
}

.win-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 1000;
}

.win-message h2 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 2em;
}

.win-message p {
    color: #495057;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.hidden {
    display: none;
}

.hint-explanation {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
    animation: slideIn 0.3s ease-out;
}

.hint-explanation h3 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-explanation p {
    color: #424242;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1em;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.hint-explanation button {
    background: linear-gradient(45deg, #2196f3, #1976d2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.hint-explanation button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

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

.hint-number {
    font-size: 11px;
    margin: 1px;
    color: #495057;
}

.completed-hint {
    color: #28a745;
    text-decoration: line-through;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    button {
        padding: 8px 16px;
        font-size: 12px;
    }
}
