:root {
    --link: #096B92;
    --link-hover: #064662;
    --link-secondary: #D88B19;
    --link-secondary-hover: #bf7c17;
    --color-body-background: #F4F5F6;
    --color-background-dark: #313744;
    --color-border: #e6e6e6;
    --border-radius: 6px;
    --border: 1px solid var(--color-border);
}

:root {
    --slate-50: rgb(248 250 252);
    --slate-100: rgb(241 245 249);
    --slate-200: rgb(226 232 240);
    --slate-300: rgb(203 213 225);
    --slate-400: rgb(148 163 184);
    --slate-500: rgb(100 116 139);
    --slate-600: rgb(71 85 105);
    --slate-700: rgb(51 65 85);
    --slate-800: rgb(30 41 59);
    --slate-900: rgb(15 23 42);
    --slate-950: rgb(2 6 23);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    height: 100%;
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    overflow-x: hidden;
    padding: 0;
}

a {
    text-decoration: none;
    color: var(--link);
}

p {
    margin: 0;
    padding: 0;
}

.app {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    margin: 1.6rem auto;
    width: 780px;
}

.app-main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.app-footer {
    color: #777;
    font-size: 14px;
    padding: 1rem 2rem;
    text-align: center;
}

h1, h2, h3, h4 {
    font-family: "Faustina", 'Georgia', serif;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 2rem;
    line-height: 1.2;
}

/* GermanZen Header */

.germanzen-header {
    background-color: #fff;
    border-bottom: 1px solid #E6E6E6;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.germanzen-header-section {
    width: 33%;
}

.germanzen-header a {
    color: #313744;
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    align-items: center;
}

.germanzen-logo {
    padding: 0.4rem 1rem;
}

.germanzen-logo svg {
    height: 30px;
}

.germanzen-menu {
    display: flex;
    flex-direction: row;
    gap: 1.4rem;
    justify-content: center;
}

.germanzen-menu a {
    border-bottom: 3px solid transparent;
    padding: 1.1rem 0 1rem 0;
}

.germanzen-menu a svg {
    width: 18px;
    display: none;
}

.germanzen-menu a.active {
    font-weight: 600;
    border-bottom-color: #313744;
}

.germanzen-account {
    display: flex;
    justify-content: end;
    padding-right: 1rem;
}

@media (max-width: 660px) {

    .germanzen-menu {
        gap: 0.6rem;
        width: 100%;
        justify-content: end;
        padding-right: 2rem;
    }

    .germanzen-account {
        display: none;
    }

}

/* Page header */

.page-header {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 0 3.4rem;
    text-align: center;
    justify-content: center;
}

.page-header-icon {
    background-color: #1E293B;
    width: 52px;
    height: 52px;
    padding: 0.4rem;
    border-radius: 0.3rem;
    transform: rotate(-10deg);
    box-shadow: 4px 4px 12px rgba(0,0,0,0.2);
    margin-bottom: -12px;
}

.page-header-icon svg {
    color: white;
}

.page-header-text {
    font-family: "Faustina", 'Georgia', serif;
    font-weight: 600;
    font-size: 2.8rem;
    color: #1E293B;
}

/* Story header */

.header {
    display: flex;
    flex-direction: row;
    padding: 0 80px;
    gap: 2rem;
}

.header-cover {
    position: relative;
    height: 268px;
    line-height: 1;
    transform-style: preserve-3d;
}

.header-cover img {
    border-radius: var(--border-radius);
    height: 268px;
}

.header-cover::before {
    border-radius: 6px;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    content: '';
    left: -10px;
    bottom: -10px;
    position: absolute;
    filter: blur(14px);
    transform: translateZ(-1px);
}

/*
.header-cover::after {
    content: '';
    border-left: 1px solid rgba(255,255,255,0.4);
    border-right: 1px solid rgba(0,0,0,0.4);
    left: 24px;
    height: 100%;
    z-index: 20;
    position: absolute;
} */

.story-meta {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    padding-top: 0.2rem;
    align-items: center;
}

.level {
    font-weight: 700;
    color: rgba(0,0,0,0.5);
    font-size: 10px;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.3rem;
    border-radius: 0.2rem;
    text-transform: uppercase;
}

.new-badge {
    font-weight: 700;
    color: white;
    font-size: 10px;
    background-color: #d97f3f;
    padding: 0.2rem 0.3rem;
    border-radius: 0.2rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-direction: row;
}

.date {
    color: rgba(0,0,0,0.5);
    font-size: 14px;
    font-weight: 600;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    height: 170px;
    justify-content: center;
}

.title p {
    color: #777;
}


/* Tools/Settings */

.tools {
    display: flex;
    flex-direction: row;
    gap: 1.4rem;
    border: 1px solid #E6E6E6;
    border-radius: var(--border-radius);
    padding: 25px 50px 25px calc( 50px + 190px + 30px + 2rem);
    font-size: 15px;
}

.tools-div {
    border-right: 1px solid #E6E6E6;
    height: 20px;
    width: 1px;
}

.settings {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.tools a {
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.tools a:hover {
    color: var(--link-hover);
}

.toggle {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.toggle:hover {
    cursor: pointer;
}

.toggle .label {
    color: #999;
    font-weight: 600;
    display: inline-block;
    user-select: none;
    transition: all 0.2s ease-in-out;
    align-self: center;
}

.toggle .label:hover {
    color: var(--link-hover);
}

.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 18px;
    background-color: #ccc;
    transition: .4s;
    border-radius: 14px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.slider {
    cursor: pointer;
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    top: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 12px;
}

input:checked + .switch {
    background-color: var(--link);
}

input:checked ~ .label {
    color: var(--link);
}

input:checked + .switch .slider {
    transform: translateX(12px);
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}


/* Story/Lines */

.story {
    background-color: white;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    flex-grow: 1;
    margin-top: -90px;
}

body[data-show-text="true"] .lines { display: flex; }
body[data-show-text="true"] .audio-placeholder { display: none; }

body[data-show-text="false"] .lines { display: none; }
body[data-show-text="false"] .audio-placeholder { display: flex; }

body[data-show-translations="true"] .translation { display: block; }
body[data-show-translations="false"] .translation { display: none; }

.lines {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    padding: 60px 80px 60px 80px;
}

.line {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    opacity: 0.3;
    transition: all ease-in-out 0.2s;
}

.line.active {
    opacity: 1;
}

.line-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid #dddcdc;
    border-radius: 6px;
    padding: 1rem;
    max-width: 446px;
    box-shadow: 0 2px 4px 0px rgba(0,0,0,.075);
}

.line .line-content:hover {
    cursor: pointer;
}

.line-de {
    font-family: "Faustina", 'Georgia', serif;
    font-size: 118%;
    line-height: 1.3;
    font-weight: 500;
}

.line-translation {
    font-size: 90%;
    color: #777;
}

.avatar {
    border-radius: 100%;
    background-repeat: no-repeat;
    height: 48px;
    width: 48px;
    border: 1px solid #dddcdc;
    box-shadow: 0 2px 4px 0px rgba(0,0,0,.075);
    flex: 0 0 48px;
}

.line[data-speaker="narrator"] {
    flex-direction: row-reverse;
    text-align: right;
}

.line[data-speaker="narrator"] .avatar {
    background-image: url("/storage/stories/images/narrator.png");
    background-position: center;
    background-size: contain;
}

.line[data-speaker="sasha"] .avatar {
    background-image: url("/storage/stories/images/sasha.png");
    background-position: center;
    background-size: contain;
}

.line[data-speaker="moro"] .avatar {
    background-image: url("/storage/stories/images/moro.png");
    background-position: center;
    background-size: contain;
}


/* Lines: Audio Placeholder */

.audio-placeholder {
    color: var(--color-border);
    height: 80%;
    padding: 4rem 2rem;
}

.audio-placeholder svg {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
}

.audio-placeholder svg rect {
    transition: all 2s ease-in-out;
}

/* Play features */

.player-box {
    bottom: 0;
    position: fixed;
    width: 780px;
}

.player-box-content-wrapper {
    background-color: var(--color-background-dark);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.player-box-content {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 1.2rem;
    position: relative;
    width: 100%;
}

.player-box-content-section {
    display: flex;
    flex-grow: 1;
    width: 100%;
}

.player-box-content-section-play-pause {
    display: inline-block;
    margin-top: -1.4rem;
    padding-bottom: 0.2rem;
    text-align: center;
}

.player-box-content-section-next {
    gap: 1rem;
    justify-content: end;
}

.play-story-divider {
    width: 1px;
    height: 20px;
    background-color: white;
    opacity: 0.2;
}

.play-button {
    background-color: var(--link-secondary);
    box-shadow:
        inset 0 -3px 0 rgba(0,0,0,0.3),
        0 0 6px rgba(0,0,0,0.4);
    border-radius: var(--border-radius);
    color: white;
    display: inline-block;
    padding: 13px 14px 15px 14px;
    position: relative;
    transition: all 0.2s ease-in-out;
    z-index: 110;
}

.play-button:hover {
    background-color: var(--link-secondary-hover);
}

.play-button span {
    display: block;
    height: 32px;
    width: 32px;
}

.play-button[data-state="play"] .play-button-play { display: block; }
.play-button[data-state="play"] .play-button-pause { display: none; }

.play-button[data-state="pause"] .play-button-play { display: none; }
.play-button[data-state="pause"] .play-button-pause { display: block; }

.play-story-link {
    align-items: center;
    display: flex;
    color: white;
    flex-direction: row;
    font-size: 14px;
    font-weight: 500;
    gap: 0.3rem;
    transition: all 0.2s ease-in-out;
}

.play-story-link:hover {
    color: rgba(255,255,255,0.8);
}

.play-story-link svg {
    height: 16px;
    width: 16px;
}

@media (max-width: 780px) {

    h1 {
        font-size: 1.6rem;
    }

    .app {
        width: 100%;
        padding: 0;
    }

    .header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .tools {
        padding-left: calc( 190px + 3rem );
        padding-right: 1rem;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .player-box {
        width: 100%;
    }

    .player-box-content-wrapper {
        padding: 0 1rem;
        border-radius: 0;
    }

    .lines {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .player-box-content {
        padding-left: 0;
        padding-right: 0;
    }

    .play-story-link span {
        display: none;
    }

}

@media (max-width: 600px) {

    .tools {
        align-items: start;
    }

    .settings {
        flex-direction: column;
    }

    .tools-div {
        display: none;
    }

}

/* Story List */

.story-list {
    background-color: white;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    max-width: 660px;
    margin: 0 auto 1rem;
}

.story-list h2 {
    font-size: 1.8rem;
}

.story-list .header {
    padding: 0;
}

.story-list .story-list-story {
    border-bottom: 1px solid var(--color-border);
    padding: 2rem;
    transition: all .2s ease-in-out;
}

.story-list .story-list-story:hover {
    background-color: var(--slate-50);
}

.story-list .story-list-story:last-child {
    border-bottom: 0;
}

.story-list .header-cover,
.story-list .header-cover img {
    border-radius: var(--border-radius);
    height: 168px;
    transition: all .2s ease-in-out;
}

.story-list-story:hover .header-cover img {
    transform: scale(1.075);
}

.story-list .header-cover::before {
    background-color: rgba(0,0,0,0.2);
    left: -4px;
    bottom: -4px;
    filter: blur(8px);
}

/* Placeholders */

.placeholder-body {
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    margin: 0 auto 1rem;
    width: 660px;
}


.placeholder-body {
    position: relative;
}

.placeholder-body[data-soon="true"]::before {
    background-color: #AB5443;
    border-radius: 0.2rem;
    color: white;
    content: "Coming soon";
    font-size: 75%;
    font-weight: 800;
    left: calc( 50% - 53px );
    letter-spacing: 0.05rem;
    padding: 0.2rem 0.4rem;
    position: absolute;
    text-transform: uppercase;
    top: -0.7rem;
}

.placeholder-body h2 {
    font-size: 160%;
}

.placeholder-body h3 {
    font-size: 130%;
}

.placeholder-body p {
    color: var(--slate-600);
    line-height: 1.5;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.placeholder-main {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.placeholder-subscribe {
    background-color: var(--slate-50);
    padding: 2rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: var(--border);
    border-top: var(--border);
    gap: 1rem;
}

.placeholder-features {
    display: flex;
    flex-direction: row;
}

.placeholder-feature {
    padding: 2rem;
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.placeholder-feature-1 {
    border-right: var(--border);
}

.placeholder-button {
    background-color: #096B92;
    color: #fff;
    padding: 0.8rem 0.9rem;
    border-radius: 0.25rem;
    font-weight: 600;
    align-self: flex-start;
    display: inline-block;
    height: auto;
}

/* Placeholder: Body: Mobile */

@media (max-width: 660px) {

    .placeholder-body {
        width: 100%;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .placeholder-subscribe {
        flex-direction: column;
    }

    .placeholder-features {
        flex-direction: column;
    }

    .placeholder-feature {
        width: 100%;
    }

    .placeholder-feature-1 {
        border-right: 0;
        border-bottom: var(--border);
    }


}

/* Placeholder: Cards */

.hide {
    display: none !important;
}

.content {
    height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.words-example {
    padding: 0 2rem;
}

.words-example .actions {
    padding: 0 1rem;
    width: 100%;
}

@media (max-width: 660px) {

    .words-example {
        padding: 0;
    }

    .words-example .actions {
    }

}

/* Card: Styles */

.cards {
    height: 24rem;
    width: 100%;
}

.card {
    height: 20rem;
    position: absolute;
    width: 100%;
}

.card-top {
    transition: all 0.2 ease;
    z-index: 30;
}

.card-top:hover {
    cursor: pointer;
    scale: 1.025;
}

.card-middle {
    margin-top: 3rem;
    opacity: 1;
    scale: 0.8;
    z-index: 20;
}

.card-bottom {
    margin-top: 5.3rem;
    opacity: 0.6;
    scale: 0.65;
    z-index: 10;
}

.card-hidden {
    margin-top: 7.75rem;
    opacity: 0;
    scale: 0.45;
    z-index: 0;
}

/* Card: Content */

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.card-body-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: center;
}

.card-word {
    font-size: 4rem;
    letter-spacing: -0.1rem;
}

.card-example {
    color: rgba(100, 116, 139, 1);
    font-size: 110%;
    font-style: italic;
    font-weight: 500;
}

.card-body-actions {
    display: flex;
    gap: 1.2rem;
    justify-content: flex-end;
}

.card-icon {
    color: rgb(148, 163, 168);
    height: 28px;
    width: 28px;
    transition: all 0.2s ease;
}

.card-icon:hover {
    color: rgb(100, 116, 139);
}

.card-flip-back .card-audio {
    display: none;
}

/* Card: Flip */

.card-flip {
    perspective: 60rem;
}

.card-flip-content {
    position: absolute;
    height: 100%;
    transition: all ease 0.5s;
    transform-style: preserve-3d;
    width: 100%;
}

.card-flip-card {
    backface-visibility: hidden;
    background: white;
    border-radius: 0.3rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
    height: 100%;
    padding: 1.6rem;
    position: absolute;
    width: 100%;
}

.card-flip-back {
    transform: rotateY(180deg);
}

.card-flip-over .card-flip-content {
    transform: rotateY(180deg);
    transition: all ease 0.5s;
}

.card-middle .card-body {
    opacity: 0;
}

/* Card: Animations */

.card-remove {
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
    z-index: 40;
}

.card-top,
.card-middle,
.card-bottom,
.card-hidden {
    transition: all 0.5s cubic-bezier(0.23, 0.93, 0.45, 0.95);
}

@keyframes removeCardUp {
    10% {
        margin-top: 0;
        transform: rotate(0);
    }
    60% {
        opacity: 1;
    }
    100% {
        margin-top: -25rem;
        opacity: 0;
        transform: rotate(12deg);
    }
}

.card-remove-good,
.card-remove-easy {
    animation-name: removeCardRight;
}

@keyframes removeCardRight {
    10% {
        margin-left: 0;
        transform: rotate(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        margin-left: 25rem;
        transform: rotate(12deg);
        opacity: 0;
        background-color: #97bcb6;
    }
}

.card-remove-again,
.card-remove-hard {
    animation-name: removeCardLeft;
}

@keyframes removeCardLeft {
    0% {
        margin-left: 0;
        transform: rotate(0);
    }
    10% {
        transform: rotate(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        margin-left: -25rem;
        transform: rotate(-12deg);
        opacity: 0;
        background-color: #ddb8b9;
    }
}

.buttons {
    display: flex;
    gap: 1rem;
}

.card-button {
    background-color: white;
    border-radius: 0.3rem;
    color: white;
    flex: 1;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.3rem 0.4rem;
    display: flex;
    flex-direction: column;
}

.card-button-again { background-color: #bc7273; }
.card-button-again:hover { background-color: #a86668; }

.card-button-hard { background-color: #D88B19; }
.card-button-hard:hover { background-color: #c27d17; }

.card-button-good { background-color: #3d61b5; }
.card-button-good:hover { background-color: #3757a3; }

.card-button-easy { background-color: #307a6d; }
.card-button-easy:hover { background-color: #2b6e62; }

.card-button svg {
    height: 46px;
}

/* End: Totals */

.end {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.3rem;
    display: flex;
    flex-direction: column;
    height: 24rem;
    justify-content: space-between;
    padding: 2rem;
    width: 100%;
}

.total {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    border: 2px solid var(--slate-300);
    border-radius: var(--border-radius);
}

.total-block {
    display: flex;
    flex-direction: row;
    padding: 1.5rem;
    gap: 1rem;
    align-items: center;
}

.total-again,
.total-hard {
    border-bottom: 2px solid var(--slate-300);
}

.total-again,
.total-good {
    border-right: 2px solid var(--slate-300);
}

.total-block svg {
    height: 48px;
    width: 48px;
}

.total-num {
    font-size: 3rem;
}

.total-again svg { color: #bc7273; }
.total-hard svg { color: #D88B19; }
.total-good svg { color: #3d61b5; }
.total-easy svg { color: #307a6d; }

.reset {
    border-radius: 0.3rem;
    font-size: 90%;
    line-height: 1;
    padding: 0.5rem 0.6rem;
    transition: all ease 0.5s;
    text-decoration: none;
}

.reset:hover {
}

.reset svg {
    height: 30px;
    width: 30px;
}

.try-it {
    position: absolute;
    right: -34px;
    bottom: 64px;
    transform: rotate(-20deg);
}


@media (max-width: 660px) {
    .try-it {
        display: none;
    }
}

.newsletter-banner {
    background: var(--slate-50);
    padding: 1rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    box-shadow: inset 0 4px 6px 0 rgba(0, 0, 0, 0.1);
    align-items: center;
    color: var(--slate-600);
    gap: 1rem;
}

.placeholder-button-md {
    padding: 0.5rem 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}
