/* Dieselben Werte wie in Hitline.Player/App.xaml und MainPage.xaml */

@font-face {
    font-family: "Archivo Black";
    src: url("fonts/ArchivoBlack-Regular.ttf") format("truetype");
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("fonts/OpenSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("fonts/OpenSans-Semibold.ttf") format("truetype");
    font-weight: 600;
    font-display: swap;
}

:root {
    --vinyl: #141218;
    --groove: #34303f;
    --cream: #fbf3e4;
    --accent: #e4572e;
    --mustard: #f2a93b;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--vinyl);
    color: var(--cream);
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

.definitions {
    position: absolute;
    width: 0;
    height: 0;
}

main {
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    row-gap: 20px;
    width: 100%;
    max-width: 480px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(32px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
}

.pill {
    padding: 8px 22px;
    border: 2px solid var(--mustard);
    border-radius: 18px;
    font-family: "Archivo Black", sans-serif;
    font-size: 20px;
    letter-spacing: 5px;
}

.stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

#view-flip {
    gap: 24px;
}

footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

footer:empty {
    display: none;
}

h1 {
    margin: 0;
    font-family: "Archivo Black", sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
}

.hint {
    margin: 0;
    line-height: 1.35;
    text-align: center;
}

.small {
    font-size: 14px;
}

button, .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 8px 16px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: var(--vinyl);
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;

    /* Langes Drücken zeigt bei Links sonst eine Vorschau der Spotify-Seite */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

button:disabled {
    opacity: .45;
    cursor: default;
}

.secondary {
    border: 2px solid var(--cream);
    background: transparent;
    color: var(--cream);
}

.narrow {
    width: 240px;
    max-width: 100%;
}

.modes {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.mode-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mode-buttons button {
    border: 2px solid var(--cream);
    background: transparent;
    color: var(--cream);
}

.mode-buttons button[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--vinyl);
}

.camera-frame {
    width: min(290px, 100%);
    aspect-ratio: 1;
    overflow: hidden;
    border: 4px solid var(--mustard);
    border-radius: 24px;
    background: var(--groove);
}

.camera-frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.record {
    position: relative;
    display: block;
    flex: none;
    width: min(280px, 100%);
    min-height: 0;
    height: auto;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden; /* Die Ecken der drehenden Ebene ragen sonst über den Rand */
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.record-flip {
    width: min(240px, 100%);
}

.record-still {
    width: min(240px, 100%);
}

.layer {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.cover {
    position: absolute;
    top: 22.14%;
    left: 22.14%;
    width: 55.72%;
    height: 55.72%;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0;
    transform: scale(.6);
}

/* Der Übergang gehört nur zum Einblenden: Beim Verbergen muss das Cover sofort weg sein */
.cover.shown {
    opacity: 1;
    transform: scale(1);
    transition: opacity .35s, transform .5s cubic-bezier(.33, 1, .68, 1);
}

.spindle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--cream);
}

.reveal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.reveal-hint {
    font-size: 14px;
    opacity: .75;
}

.song {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: center;
    animation: fade-in .5s;
}

.song strong, .song span {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.song strong {
    font-family: "Archivo Black", sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0;
    padding: 16px 24px;
    background: var(--accent);
    color: var(--vinyl);
    font-weight: 600;
    text-align: center;
}
