/* General Styles */
body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #fdf6e3; /* Soft, warm background */
    color: #5d4037; /* Dark brown text for contrast */
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

h1 {
    color: #d35400; /* Vibrant orange for the main title */
    font-size: 2.5em;
    margin-bottom: 0.2em;
}

p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    border-bottom: 2px solid #eee;
}

.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2em;
    font-weight: 700;
    color: #7f8c8d;
    position: relative;
    transition: color 0.3s ease;
}

.tab-link.active {
    color: #c0392b; /* Strong red for the active tab */
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #c0392b;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Fact Section */
#fact-container {
    background-color: #f9f9f9;
    border-left: 5px solid #d35400;
    padding: 20px;
    margin: 20px auto;
    border-radius: 8px;
    min-height: 80px; /* **Fixed height to prevent layout shift** */
    display: flex;
    justify-content: center;
    align-items: center;
}

#fact-text {
    font-size: 1.2em;
    font-style: italic;
}

#new-fact-btn {
    background-color: #e67e22; /* Bright orange button */
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#new-fact-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

/* Game Section */
#game-canvas {
    background-color: #ecf0f1; /* Light grey canvas background */
    border-radius: 8px;
    margin: 0 auto;
    display: block;
    width: 100%;      /* **Make canvas responsive** */
    height: auto;     /* **Maintain aspect ratio** */
}

.instructions {
    margin-top: 15px;
    font-size: 1em;
    color: #7f8c8d;
}
