@import url('https://fonts.googleapis.com/css2?family=Grenze&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --background-color: #202124;
    --surface-color: #303134;
    --text-color: #e8eaed;
    --secondary-text-color: #bdc1c6;
    --primary-color-start: #73b798;
    --primary-color-end: #8479fc;
    --primary-gradient: linear-gradient(45deg, var(--primary-color-start), var(--primary-color-end));
    --primary-gradient-hover: linear-gradient(90deg, #73b798, #8479fc);
    --border-color: #5f6368;
    --hover-bg-color: rgba(132, 121, 252, 0.1);
    --button-base-size: 180px;
    --button-gap: 20px;
    --side-padding: 2rem;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
}

body::before {
    display: none;
}

:focus-visible {
    outline: 2px solid var(--primary-color-start);
    outline-offset: 2px;
    border-radius: 4px;
}

#content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

header {
    background-color: var(--surface-color);
    padding: 1rem var(--side-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    height: 60px;
    width: auto;
    margin-right: 5px;
}

.header-logo:hover {
    filter: drop-shadow(0 0 8px var(--primary-color-end));
}

.site-name-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Grenze', serif;
}

.site-name-text:hover {
    background: var(--primary-gradient-hover);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

nav {
    position: relative;
    flex-grow: 0;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
}

.nav-toggle:hover {
    background-color: var(--hover-bg-color);
    border-radius: 9999px;
    background: var(--primary-gradient-hover);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.nav-toggle:active {
    transform: scale(0.95);
    background-color: rgba(132, 121, 252, 0.2);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
}

.nav-links li {
    width: auto;
    text-align: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 8px;
}

.nav-links a:hover {
    background-color: var(--hover-bg-color);
    color: var(--text-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: underline;
}

.nav-links a:active {
    background-color: rgba(132, 121, 252, 0.2);
    transform: translateY(1px);
}

.star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background-color: transparent;
}

.star {
    opacity: 0;
    animation: none;
}

main {
    flex-grow: 1;
    padding: 4rem var(--side-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.button-grid-container {
    display: grid;
    gap: var(--button-gap);
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: calc(3 * var(--button-base-size) + 2 * var(--button-gap));
    margin: 0 auto;
    opacity: 1;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: minmax(150px, auto);
}

.action-button {
    background-color: var(--surface-color);
    color: var(--text-color);
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    aspect-ratio: 1 / 1;
    width: 100%;
    box-sizing: border-box;
}

.action-button:hover {
    background-color: var(--surface-color);
}

.action-button:active {
    background-color: #2b2c2e;
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.button-icon {
    width: 50px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    filter: none;
}

.action-button:hover .button-icon {
    filter: drop-shadow(0 0 8px var(--primary-color-end));
}

.action-button span {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
    text-decoration: none;
}

.action-button:hover span {
    color: var(--text-color);
    text-decoration: underline;
}

.readable-text-block {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    line-height: 1.7;
    letter-spacing: 0.02em;
    padding: 1rem;
}

.impressum-table p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.impressum-table strong {
    display: inline-block;
    width: 180px;
    text-align: left;
    margin-right: 10px;
}

footer {
    background-color: var(--surface-color);
    padding: 1.5rem var(--side-padding);
    text-align: center;
    font-size: 0.85rem;
    color: var(--secondary-text-color);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 0;
    margin-top: auto;
    position: relative;
    display: block;
}

.footer-images-container {
    position: absolute;
    right: var(--side-padding);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
    max-width: 50%;
    height: 100%;
    box-sizing: border-box;
    padding-left: 10px;
    overflow: hidden;
}

.footer-image-link {
    display: block;
    flex-shrink: 0;
}

.footer-image {
    max-height: 3.5rem;
    width: auto;
    opacity: 0.5;
    filter: grayscale(100%) contrast(150%);
}

.footer-image:hover {
    opacity: 1;
    filter: grayscale(0%) contrast(100%);
}

footer a {
    color: var(--primary-color-end);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: left;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Grenze', serif;
    margin-top: 4rem;
    margin-bottom: 0rem;
    color: var(--text-color);
}

section h1 {
    font-size: 2.2rem;
    margin-bottom: 0rem;
    font-weight: 700;
    text-align: left;
    color: var(--primary-color-end);
}

section h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

section h3 {
    font-size: 1.2rem;
    font-weight: normal;
    text-decoration: underline;
}

section h4, section h5, section h6 {
    font-size: 1.1rem;
    font-weight: normal;
    text-decoration: underline;
}

section p, section ul, section li {
    line-height: 1.6;
    color: #cccccc;
}

ul {
    list-style-type: square;
}

section a {
    text-decoration: none;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

section a:hover {
    text-decoration: underline;
    background: var(--primary-gradient-hover);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

section a:active {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    transform: translateY(1px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    margin-left: 1rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    display: block;
    box-sizing: border-box;
    text-align: left;
}

.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    resize: vertical;
    display: block;
    box-sizing: border-box;
    text-align: left;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--primary-color-start);
    outline: none;
    box-shadow: 0 0 0 2px rgba(132, 121, 252, 0.3);
}

.submit-button {
    background: var(--primary-gradient);
    color: var(--background-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

.submit-button:hover {
    background: var(--primary-gradient-hover);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-button:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.error-text {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
    border-color: #ff6b6b;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.form-group-inline label {
    flex-shrink: 0;
    min-width: 120px;
    text-align: right;
    margin-bottom: 0;
}

.form-group-inline input[type="text"],
.form-group-inline input[type="email"],
.form-group-inline input[type="date"] {
    flex-grow: 1;
    max-width: 300px;
}

.form-group-inline input[type="text"][maxlength="4"] {
    width: 80px;
    flex-grow: 0;
}

.movie-form {
    background-color: #333333;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.movie-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #e0e0e0;
    text-align: left;
}

.movie-form input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    display: block;
    text-align: left;
}

.movie-form input[type="text"]:focus {
    border-color: var(--primary-color-start);
    outline: none;
    box-shadow: 0 0 0 2px rgba(132, 121, 252, 0.3);
}

.movie-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.movie-card {
    background-color: #333333;
    border: 1px solid #444444;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.movie-cover-placeholder {
    flex-shrink: 0;
    width: 100px;
    height: 150px;
    background-color: #444;
    border-radius: 1px;
    overflow: hidden;
}

.movie-cover-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.movie-info > div {
    flex-grow: 1;
}

.movie-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 1.3em;
}

.movie-year {
    font-size: 0.85em;
    color: #bbbbbb;
    font-weight: normal;
    margin-left: 5px;
}

.movie-added-date {
    font-size: 0.8em;
    color: #aaaaaa;
    margin-bottom: 0;
}

.movie-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.movie-likes {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #c0c0c0;
}

.heart-icon {
    color: var(--primary-color-end);
    font-size: 1.5em;
    cursor: pointer;
}

.heart-icon:hover {
    transform: scale(1.2);
}

.heart-icon:active {
    transform: scale(1.1);
}

.like-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 1em;
    color: inherit;
}

.like-button:active {
    transform: translateY(1px);
}

.delete-button {
    background-color: var(--primary-color-end);
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 99999px;
    cursor: pointer;
    font-size: 0.9em;
}

.no-movies-message {
    text-align: center;
    color: #b0b0b0;
    padding: 40px;
    border: 1px dashed #555;
    border-radius: 8px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .impressum-table strong {
        width: 130px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        min-width: unset;
        box-shadow: 0px 4px 8px rgba(0,0,0,0.3);
        z-index: 10;
        border-radius: 0 0 8px 8px;
        overflow: hidden;
        border: 1px solid var(--border-color);
        border-top: none;
    }
    
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        padding: 0.8rem;
    }

    .button-grid-container {
        grid-template-columns: 1fr;
        max-width: 300px;
        padding: 0;
    }

    .action-button {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.8rem 1rem;
        aspect-ratio: auto;
        flex-basis: 100%;
        max-width: 100%;
    }

    .button-icon {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }

    .action-button span {
        font-size: 0.9rem;
    }

    .readable-text-block {
        padding: 0.8rem;
        font-size: clamp(1.1rem, 4vw, 1.25rem);
    }

    footer {
        padding: 1rem;
    }

    .footer-images-container {
        position: static;
        transform: none;
        margin-top: 1rem;
        width: auto;
        max-width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        padding-left: 0;
    }

    section {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    section h1 {
        font-size: 1.8rem;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .form-group-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .form-group-inline label {
        text-align: left;
        min-width: unset;
        width: 100%;
    }

    .form-group-inline input[type="text"],
    .form-group-inline input[type="email"],
    .form-group-inline input[type="date"],
    .form-group-inline textarea {
        max-width: 100%;
    }

    .form-group-inline input[type="text"][maxlength="4"] {
        width: 100px;
        flex-grow: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --side-padding: 1rem;
    }

    .site-name-text {
        font-size: 1.2rem;
    }

    .header-logo {
        height: 30px;
    }
}
