/* 评价页面 - 高级设计：独立板块整体设计 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #d4af37;
    --text-primary: #1a1a1a;
    --text-secondary: #8e8e93;
    --border-color: #e5e5ea;
    --background: #f8f9fa;
    --card-background: #ffffff;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --broadcast-primary: #2196f3;
    --reviews-primary: #d4af37;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 430px;
    margin: 0 auto;
    background: var(--background);
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* 顶部栏 - 精致设计 */
.top-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px 20px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title .section-icon {
    color: var(--accent-color);
    width: 28px;
    height: 28px;
}

.page-title .section-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

/* 内容区域 */
.reviews-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 通用卡片样式 - 独立板块整体设计 */
.broadcast-card,
.reviews-card {
    background: var(--card-background);
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.broadcast-card:hover,
.reviews-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 卡片头部 - 标题内置 */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 250, 0.8) 100%);
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.card-header-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.broadcast-card .card-header-icon {
    color: var(--broadcast-primary);
}

.reviews-card .card-header-icon {
    color: var(--reviews-primary);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
    margin: 0;
}

/* 卡片主体 */
.card-body {
    padding: 24px;
}

/* 实时播报板块 - 固定框架设计 */
.broadcast-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border: 2px solid rgba(33, 150, 243, 0.15);
}

.broadcast-card .card-header {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.08) 0%, rgba(33, 150, 243, 0.03) 100%);
    border-bottom-color: rgba(33, 150, 243, 0.15);
}

.trade-ticker {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(227, 242, 253, 0.5) 100%);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(33, 150, 243, 0.2);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
    min-height: 70px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.trade-ticker::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.ticker-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.ticker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ticker-text {
    font-size: 15px;
    color: #1565c0;
    flex: 1;
    line-height: 1.6;
    font-weight: 500;
    min-height: 24px;
    display: flex;
    align-items: center;
}

/* 用户评价板块 - 精致设计 */
.reviews-card {
    background: linear-gradient(135deg, #ffffff 0%, #fffef7 100%);
    border: 2px solid rgba(212, 175, 55, 0.12);
}

.reviews-card .card-header {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.06) 0%, rgba(212, 175, 55, 0.02) 100%);
    border-bottom-color: rgba(212, 175, 55, 0.15);
}

.btn-add-review {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #c9a52a 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-add-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

.btn-add-review:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.btn-add-review .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-add-review .btn-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

/* 评价列表容器 - 参考九社 */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* 评价卡片 - 参考九社的真实结构 */
.review-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.review-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.review-stars {
    font-size: 14px;
    color: #ffa726;
    letter-spacing: 2px;
}

.review-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
    font-weight: 400;
    margin-top: 8px;
}

/* 有配图时，为文本留出右上角空间 */
.review-card.has-image .review-text {
    padding-right: 80px;
}

/* 评价图片容器 - 右上角正方形 */
.review-image-container {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.review-image-container:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
}

.review-image-container:active {
    transform: scale(0.95);
}

.review-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 15px;
    font-weight: 500;
}

/* 发表评论弹窗 - 精致设计 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--background);
    border-radius: 28px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.modal-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--accent-color);
}

.modal-title-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.modal-close:hover {
    background: #e8e8e8;
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-close span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.modal-close span svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.form-label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--accent-color);
}

.form-label-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.star-rating-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.star-rating {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    filter: grayscale(100%);
    opacity: 0.4;
}

.star.active,
.star.hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.rating-display {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 40px;
}

.form-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    background: var(--card-background);
    line-height: 1.6;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
    background: #ffffff;
}

.char-counter {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--secondary-color) 0%, #ffffff 100%);
}

.upload-area:hover {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.03) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.upload-area:active {
    background: #e8e8e8;
    border-color: var(--accent-color);
    transform: translateY(0);
}

.upload-icon {
    margin: 0 auto 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    color: var(--accent-color);
}

.upload-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.image-preview-container {
    margin-top: 16px;
    position: relative;
}

.image-preview-item {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.remove-image-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.remove-image-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.95);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    flex: 1;
    padding: 18px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #c9a52a 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: scale(0.98);
    background: #d0d0d0;
}

.btn-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-icon-inline svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--card-background);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 4px 16px;
    border-radius: 12px;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: currentColor;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* 加载提示 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}
