body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 50% 120%, #1e3c72 0%, #0a192f 50%, #020c1b 100%);
    color: white;
    user-select: none;
}


#search-container {
    position: fixed;
    top: 25px;
    right: 40px;
    z-index: 100;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 8px 15px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#search-container:focus-within, #search-container:hover {
    background: rgba(255, 255, 255, 0.95);
}

#search-input {
    border: none;
    background: transparent;
    outline: none;
    color: white;
    font-size: 16px;
    width: 150px;
    transition: width 0.3s, color 0.3s;
}

#search-container:focus-within #search-input {
    width: 250px;
    color: #333;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#search-container:focus-within #search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.upload-btn {
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.upload-btn:hover {
    opacity: 1;
}

#csv-upload {
    display: none;
}

#movie-grid {
    display: grid;
    padding: 80px 40px 40px 40px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    gap: 20px;
}

.card {
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

.card-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    padding: 15px;
    box-sizing: border-box;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 3px black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stars-container {
    display: flex;
    gap: 4px;
    font-size: 18px;
    color: #555;
}

.star {
    cursor: pointer;
    transition: color 0.2s;
}

.star.active, .star:hover {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.global-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#movie-modal {
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
    outline: none;
    height: 80vh;
    aspect-ratio: 1/1;
    color: white;
}

#movie-modal::backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-content {
    width: 100%;
    height: 100%;
    background: #112240;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-top {
    flex: 1;
    display: flex;
    padding: 30px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.modal-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(17, 34, 64, 1) 30%, rgba(17, 34, 64, 0.4) 100%);
}

.modal-info {
    position: relative;
    z-index: 2;
}

.modal-title {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
}

.modal-meta {
    color: #8892b0;
    font-size: 1.1rem;
}

.modal-bottom {
    height: 250px;
    display: flex;
    padding: 20px 30px;
    background: #0a192f;
}

.scores-base {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 20px;
}

.scores-meta {
    width: 250px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.score-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.meta-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid #64ffda;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
}

.meta-score {
    font-size: 2.5rem;
    font-weight: bold;
    color: #64ffda;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: white;
    z-index: 10;
}

/* 翻页提示 */
#page-indicator {
    position: fixed;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    pointer-events: none;
}


.stars-container {
    display: inline-flex;
    gap: 2px;
    font-size: 24px;
    color: #444;
    user-select: none;
}

.star-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.1s;
}

.star-wrapper:active {
    transform: scale(1.2);
}

.star.left-half {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

.star.right-half {
    display: inline-block;
}

.star.full {
    color: gold;
}

#help-btn {
    position: fixed;
    top: 32px;
    left: 40px;
    z-index: 100;
    background: none;
    border: 1px solid #a8b2d1;
    color: #a8b2d1;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#help-btn:hover {
    color: #fff;
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

#help-modal {
    background-color: #1a1c29;
    border: 1px solid #4a4d5e;
    border-radius: 8px;
    padding: 40px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

#help-modal .close-btn {
    top: -40px;
    right: -30px;
}

#help-modal::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

.help-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.help-modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}