body {
    font-family: Arial, sans-serif;
    text-align: center;
}

#container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#card {
    display: flex;
    width: 300px;
    height: 200px;
    margin: 20px -10px auto;
    padding: 10px;
    border: 1px solid #ddd;
}

.flip-card {
    background-color: transparent;
    width: 300px;
    height: 200px;
    perspective: 1000px;
    margin: 0 auto 72px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-front {
    background-color: #bbb;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    word-break: break-word;
}

.flip-card-back {
    background-color: #2980b9;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    word-break: break-word;
}

.flip-card-face-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 100%;
    gap: 6px;
}

.flip-card-face-stack p {
    margin: 0;
}

.play-morse-inline-front,
.play-morse-inline-back {
    display: none;
}

.flip-card.answer-first .play-morse-inline-front {
    display: inline-flex;
}

.flip-card:not(.answer-first) .play-morse-inline-back {
    display: inline-flex;
}

.play-morse-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
}

.play-morse-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.flip-card-front .play-morse-icon:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.08);
}

.flip-card-back .play-morse-icon:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.15);
}

.play-morse-icon:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.flip-card:not(.answer-first) .flip-card-front {
    font-size: 3.5em;
}

.flip-card:not(.answer-first) .flip-card-back {
    font-size: 3em;
}

.flip-card.answer-first .flip-card-front {
    font-size: 3em;
}

.flip-card.answer-first .flip-card-back {
    font-size: 3.5em;
}

#next-button {
    margin-top: 0;
    height: 50px;
    width: 300px;
}

.playback-speed {
    width: 100%;
    max-width: 400px;
    margin: 14px auto 0;
    padding: 0 8px;
    box-sizing: border-box;
}

.playback-speed-label {
    display: block;
    font-size: 0.95em;
    margin-bottom: 8px;
}

.playback-speed-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.playback-speed-hint {
    font-size: 0.85em;
    color: #555;
    flex: 0 0 auto;
}

#morse-speed-slider {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.playback-speed-random {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.95em;
    text-align: center;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.playback-speed-random input {
    flex-shrink: 0;
}

.playback-radio-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.95em;
    text-align: center;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.playback-radio-filter input {
    flex-shrink: 0;
}

.keyboard-hints {
    margin: 14px auto 0;
    padding: 0 12px;
    max-width: 400px;
    font-size: 0.78em;
    line-height: 1.45;
    color: #666;
}

#set-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 8px;
    max-width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
}

#set-buttons button {
    flex: 1 1 auto;
    min-width: 100px;
    max-width: 160px;
    height: 44px;
    font-size: 1.05em;
}

#set-buttons button.is-active {
    background-color: #2980b9;
    color: #fff;
    border-color: #2471a3;
}

#set-buttons button.is-active:hover {
    background-color: #3498db;
}

#header {
    font-size: 2.2em;
    justify-content: center;
    font-weight: bold;
}

#header h1 {
    margin: 0;
}

#footer {
    margin-top: 10px;
    font-size: 0.7em;
}

#content {
    text-align: start;
    width: 80vw;
    height: calc(100vh - 120px);
    overflow-x: hidden;
}

button {
    height: 50px;
    width: 200px;
    font-size: 1.6em;
}

button:hover {
    background-color: #eeeeee;
}

#consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    color: black;
    padding: 10px;
    text-align: center;
    z-index: 1000;
    border-bottom: 1px solid #ddd;
}

#consent-banner button {
    margin: 5px;
    padding: 5px 10px;
}

#accept:hover {
    background-color: #00b10665;
}

#backButton {
    margin-bottom: 20px;
}

#toggle-container {
    margin: 20px 0;
    font-size: 1em;
}

#toggle-container label {
    cursor: pointer;
}

#toggle-container input {
    transform: scale(1.2);
    margin-right: 8px;
}