/* Global Styles */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
}

/* Header */
header {
    width: 100%;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: normal;
}

header a {
    text-decoration: none;
    color: #333;
}

/* Main Content */
main {
    flex: 1;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Vertical centering for the player */
    align-items: center;
    position: relative;
}

/* Background Image */
#background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: -2;
}

#background-image.visible {
    opacity: 0.8;
}

/* Overlay for better text readability */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: -1;
    display: none;
}

#overlay.visible {
    display: block;
}


/* Menu List */
.menu-list {
    list-style: none;
    padding: 0;
    width: 100%;
}

.menu-list li {
    margin-bottom: 15px;
}

.menu-list a {
    display: block;
    padding: 20px;
    background: #f9f9f9;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    transition: background 0.2s;
}

.menu-list a:hover {
    background: #f0f0f0;
}

/* Player Container */
#player-container {
    text-align: center;
    width: 100%;
}

/* Typography for Player */
#word {
    font-size: 5rem;
    /* Large text */
    font-weight: bold;
    margin: 40px 0 20px;
    min-height: 1.2em;
    /* Prevent layout shift */
}

#pro {
    font-size: 3rem;
    /* Pronunciation */
    color: #666;
    margin-bottom: 30px;
    min-height: 1.2em;
}

#note {
    font-size: 1rem;
    /* Translation */
    color: #999;
    margin-top: auto;
    /* Push to bottom if container needed */
}

/* Controls */
.controls {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

button {
    padding: 15px 30px;
    font-size: 1rem;
    cursor: pointer;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.8;
}

button.secondary {
    background: #ddd;
    color: #333;
}

/* Hidden elements */
.hidden {
    display: none;
}