/* --- 基础卡片样式 --- */
.rating-card { 
    background: rgba(0,0,0,0.5);  
    padding: 2rem; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    text-align: center; 
    width: 360px;
    margin: 20px auto;
    position: relative;
    z-index: 100; /* 确保在测试层上方 */
}

/* 核心：精确星星容器 */
.rating-stars-wrapper {
    position: relative;
    display: inline-block;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.rating-stars-gray { color: #e0e0e0; }

.rating-stars-gold {
    color: #f39c12;
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    width: 0%; 
    transition: width 0.3s ease;
    pointer-events: none; /* 防止遮挡点击 */
}

.rating-stars-hitbox {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.rating-hit-area { flex: 1; z-index: 10; }

.rating-info { 
    color: #666; 
    font-size: 0.9rem; 
    margin: 10px 0; 
}

.rating-score-num { 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: #f39c12; 
}

.rating-status { 
    margin-top: 10px; 
    font-size: 0.85rem; 
    color: #e74c3c; 
    min-height: 1.2em; 
}

/* --- 评论表单样式 --- */
.comment-section {
    margin-top: 15px;
    text-align: left;
    position: relative;
    z-index: 101;
}

.comment-textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-size: 0.9rem;
    font-family: sans-serif;
    box-sizing: border-box;
    display: block;
    background: #fff;
    color: #333;
    /* 核心修复：允许选择文字并提升层级 */
    user-select: text !important;
    -webkit-user-select: text !important;
    position: relative;
    z-index: 102;
}

.comment-textarea:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 5px rgba(243, 156, 18, 0.2);
}

.submit-rating-btn {
    width: 100%;
    background: #f39c12;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-rating-btn:hover { background: #e67e22; }
.submit-rating-btn:disabled { background: #ccc; cursor: not-allowed; }

/* --- 评论展示列表样式 --- */
.comments-display {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: left;
}

.comments-display h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #333;
}

#comments-list {
    max-height: 250px;
    overflow-y: auto;
}

.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid #f9f9f9;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
}

.comment-user-stars { color: #f39c12; }

.comment-text {
    font-size: 0.85rem;
    color: #ffffff;
    line-height: 1.4;
    word-break: break-all;
}