:root {
  /* 字体设置 */
  --font-sans:  Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
  /* 主色调 */
  --primary-color: #f60c3e;
  --primary-text: #ffffff;
  /* 辅助色调 */
  --secondary-text-one: #7b7b7b;
  --secondary-text-two: #9b9b9b;
  /* 背景色调 */
  --bg-primary: #faf9f5;
  --bg-primary-text: #272727;
  --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}
html{
    font-family:var(--font-sans);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    text-rendering:optimizeLegibility;
    -webkit-text-stroke:0.01em transparent;
    background-color: #f60c3e;
}

body {
    font-size:calc(1rem + .1vh + .1vw);
    line-height: 1.6;
    height: 100vh;
    border: 10px solid var(--primary-color);
    color: var(--bg-primary-text);
    scroll-behavior: smooth;
    background-color: #f60c3e;
}

a {
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
    text-decoration: none;
}

a:hover {
    color: var(--primary-color);
}
button,.button {
    padding: 0.5rem 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
    color: var(--primary-color);
    background: transparent;
    border: 2px solid var(--primary-color);
}
button:hover,.button:hover {
    background: var(--primary-color);
    color: var(--primary-text);
}
.primary-button {
    background: var(--primary-color);
    color: var(--primary-text);
}
.primary-button:hover {
    color: var(--primary-color);
    background: var(--primary-text);
}
.breadcrumb {
    margin: 1rem auto;
    color: var(--secondary-text-one);
    font-size: 0.9rem;
}
.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span {
    margin: 0 0.5rem;
}
.top {
    display: none;
    height: 50px;
    background: var(--primary-color);
    color: var(--primary-text);
    align-items: center;
    padding: 0 15px;
    justify-content: space-between
}

.wrap {
    display: flex;
    height: calc(100vh - 20px)
}

nav {
    font-size: 1.25rem;
    width: 250px;
    background: var(--primary-text);
    color: var(--bg-primary-text);
    padding: 20px;
    overflow-y: auto;
    transition: transform .3s;
    border-right: 1px dotted var(--border-color);
    /* border-right: 10px solid var(--primary-color); */
}

.nav-link a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    line-height: 4rem;
}

svg {
    width: 1.8rem;
    height: 1.8rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}

.slogan {
    color: var(--secondary-text-one);
    text-align: center;
    margin-bottom: 1rem;
}

main {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: var(--primary-text)
}

.hero {
    text-align: center;
    padding: 13vh 1rem;
}

.hero .logo {
    font-size: min(5rem, 15vw);
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    max-width: min(800px, 100%);
    margin: 2rem auto;
}

.search-box input {
    width: 100%;
    padding: 1rem 6rem 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    font-size: 1.1rem;
    transition: .3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color)22;
}

.search-box button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    padding: 0 1.5rem;
    background: var(--primary-color);
    color: var(--primary-text);
    border: none;
    border-radius: 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: .2s;
}

.search-box button:hover {
    filter: brightness(1.1);
}

.keywords-box {
    display: flex;
    flex-wrap: wrap;
    padding: 5px 2px;
    justify-content: center;
    margin: 0 -2rem;
}

.dot-bg{
    background-image: radial-gradient(#ccc 0.5px, transparent 1px);
    background-size: 3px 3px;
}

.keywords-box a {
    padding: 4px 12px;
    margin: -1px 0 0 -1px;
    font-size: 0.95em;
    white-space: nowrap;
    margin: 5px;
    background-color: var(--primary-text);
    border-radius: 8px;
}

#m {
    font-size: 24px;
    cursor: pointer
}

.title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
}

.movies {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2.5em;
    padding: 1rem;
}

.movie-card {
    position: relative;
    transition: .2s;
    border: 1px dotted var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
}

.movie-card:hover {
    transform: translateY(-4px);
}

.movie-poster {
    aspect-ratio: 2/3;
    width: 100%;
    background: var(--border-color);
    border-radius: 8px;
    margin-bottom: .5rem;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-title {
    font-size: 1rem;
    font-weight: bold;
    margin: .5em auto;
    text-align: center;
}
.movie-info {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }
.movie-info span{
    background-color: var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
        }
.movie-rating {
    color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.7em;
    padding: 0.1rem 0.5rem;
}

.delete-btn {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: .2s;
}

.delete-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

.delete-btn:hover {
    background: var(--primary-color);
    color: var(--primary-text);
}

.mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 8
}

footer {
    font-size: 0.9rem;
    margin: 1rem -1rem -1rem -1rem;
    padding: 1rem;
    text-align: center;
    color: var(--secondary-text-one);
}
/* Alert Message Styles */
.alert {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 1.5rem;
    border-radius: 8px;
    color: var(--primary-text);
    font-size: 1rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert.show {
    opacity: 1;
}

.alert.success {
    background-color: #4caf50;
}

.alert.error {
    background-color: var(--primary-color);
}

.alert.info {
    background-color: #2196f3;
}
#load {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 10em;
    font-family: sans-serif;
    color: var(--secondary-text-one);
}

.cow-emoji {
    font-size: 4em;
    display: inline-block;
    animation: cow-bounce 1s ease-in-out infinite alternate;
}

@keyframes cow-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@media(max-width: 768px) {
    .top {
        display: flex
    }

    .wrap {
        flex-direction: column;
        height: calc(100vh - 20px - 50px)
    }

    .slogan {
        color: var(--secondary-text-two);
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        background: var(--primary-color);
        color: var(--primary-text);
        height: 100dvh;
        transform: translateX(-100%);
        z-index: 9;
        border: 0;
    }

    .nav-link a:hover {
        color: var(--primary-text);
    }

    nav.show {
        transform: translateX(0)
    }

    .mask.show {
        display: block
    }

    .movies {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: .5rem;
    }

    .movie-title {
        font-size: .9rem;
    }
}

::-webkit-details-marker {
    display: none
}

::-moz-list-bullet {
    font-size: 0;
    float: left
}

::-webkit-scrollbar {
    width: 0
}