body {
    font-family: "Microsoft YaHei", sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
}

h1 {
    text-align: center;
    color: #8B4513;
    margin-bottom: 30px;
}

.poem-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.poem-line {
    margin-bottom: 15px;
    line-height: 1.8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.char-container {
    position: relative;
    margin: 0 2px;
    cursor: pointer;
    text-align: center;
}

.char {
    font-size: 20px;
    display: block;
}

.pinyin {
    font-size: 12px;
    color: #E74C3C;
    display: none;
    position: absolute;
    top: -18px;
    left: 0;
    right: 0;
}

.translation {
    font-size: 12px;
    color: #3498DB;
    display: none;
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
}

.line-controls {
    margin-left: 15px;
    display: flex;
    gap: 10px;
}
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-controls a {
    text-decoration: none;
    color: #0077cc;
    font-weight: 500;
    transition: color 0.3s ease;
}

.top-controls a:hover {
    color: #004a99;
    text-decoration: underline;
}

.top-controls select {
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: white;
    transition: border-color 0.3s ease;
}

.top-controls select:focus {
    outline: none;
    border-color: #0077cc;
    box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.2);
}

button {
    padding: 5px 10px;
    background-color: #8B4513;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #A0522D;
}

.status-bar {
    margin-top: 20px;
    padding: 10px;
    background-color: #eee;
    border-radius: 4px;
    font-size: 14px;
}

.instructions {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f8f8;
    border-left: 4px solid #8B4513;
}
#translationCard {
position: fixed;  /* fixed für viewport-bezug */
background: #f0f0f0;
border: 1px solid #aaa;
padding: 12px 16px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
display: none;
max-width: 280px;
font-size: 15px;
z-index: 10000;
padding-left: 3rem;

/* zentrieren */
top: 50%;
right: 0;
transform: translateY(-50%);
}
#translationCard .close-btn {
    position: absolute;
    top: 8px;
    left: 10px;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

#translationCard button:hover {
background-color: #333
}