/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: url('./2.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    background-size: cover;
    filter: blur(3px);
    z-index: -1;
}

.content {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.85);
    min-height: 100vh;
    border-radius: 10px;
    margin-bottom: 100px;
    backdrop-filter: blur(2px);
}


/* 页面标题 */
h2 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: #333;
}


/* 主图背景 */
.main-image {
    width: 100%;
    height: 200px;
    background-image: url('./2.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 热门单模块 */
.trending,
.fun,
.entertainment,
.tech {
    margin-top: 20px;
}

.trending h3,
.fun h3,
.entertainment h3,
.tech h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    color: #555;
}

/* 图片网格布局 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.image-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    text-align: center;
    align-content: center;
    font-size: 20px;
}

.description {
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
    color: #666;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    padding: 5px;
}

.nav-item.active {
    color: #007bff;
    font-weight: bold;
}

.nav-item .icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}


/* 响应式调整 */
@media (max-width: 480px) {
    .content {
        padding: 15px;
    }

    h2 {
        font-size: 1.6rem;
    }

    .image-grid {
        gap: 10px;
    }
}
/* 转盘区样式 */
.wheel-section {
    width: 90%;
    max-width: 300px;
    margin: 20px auto;
    text-align: center;
}

.title {
    font-size: 16px;
    margin-bottom: 10px;
}

.wheel-container {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    position: relative;
    background-color: white;
    border: 2px solid #ccc;
    margin: 20px auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #ff6b6b 0deg 60deg,
        #4ecdc4 60deg 120deg,
        #ffe066 120deg 180deg,
        #9d65c9 180deg 240deg,
        #55acee 240deg 300deg,
        #ff9a8b 300deg 360deg
    );
    position: relative;
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    overflow: hidden;
}

.wheel span {
    position: absolute;
    top: 40%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    text-align: center;
    padding-top: 10px;
}

.wheel span:nth-child(1) { transform: rotate(0deg) translate(0, -100px) rotate(30deg); }
.wheel span:nth-child(2) { transform: rotate(0deg) translate(0, -100px) rotate(90deg); }
.wheel span:nth-child(3) { transform: rotate(0deg) translate(0, -100px) rotate(150deg); }
.wheel span:nth-child(4) { transform: rotate(0deg) translate(0, -100px) rotate(-150deg); }
.wheel span:nth-child(5) { transform: rotate(0deg) translate(0, -100px) rotate(-90deg); }
.wheel span:nth-child(6) { transform: rotate(0deg) translate(0, -100px) rotate(-30deg); }

.pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-10px);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 20px solid red;
    z-index: 10;
}

.result-area {
    margin-top: 20px;
    font-size: 16px;
    color: #333;
}

.rotate-btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.rotate-btn:hover {
    background: #0056b3;
}

.code-input-area {
    width: 100%;
    margin: 20px auto;
    text-align: center;
}

#code-input {
    padding: 10px;
    font-size: 16px;
    width: 170px;
    border: 1px solid #ccc;
    border-radius: 4px;

}

#validate-btn {
    margin-left: 10px;
    padding: 10px 20px;
    font-size: 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#validate-btn:hover {
    background: #0056b3;
}
/* 添加到 style.css 或内联样式中 */
.wheel-entry {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    font-size: 24px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wheel-entry:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 详情页样式 */
.detail-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    text-align: center;
    height: 40vh; /* 设置为半屏高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.original-name {
    margin: 20px 0;
    font-size: 32px;
    color: #333;
    font-weight: bold;
    white-space: pre-wrap;
}

.original-price {
    margin: 20px 0;
    color: #e74c3c;
    line-height: 1.5;
}
.detail-content h3{
    color: #555;
    margin: 20px 0;
}

.price-number {
    font-size: 32px;
    font-weight: bold;
}

.price-unit {
    font-size: 18px;
}

.detail-content {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.detail-content h2 {
    margin-top: 0;
    color: #555;
}

.description, .playway {
    margin: 10px 0;
    color: #666;
    white-space: pre-wrap;
}

.board-notes, .comments-section {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

/* ========== 评论区样式美化 ========== */

.comments-section {
    padding: 25px 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.comments-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-section h3::before {
    content: '💬';
    font-size: 1.5rem;
}

.comment-list {
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* 滚动条美化 */
.comment-list::-webkit-scrollbar {
    width: 6px;
}

.comment-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.comment-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.comment-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 评论头像 */
.comment-item::before {
    content: attr(data-user);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}

.comment-item:nth-child(1)::before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.comment-item:nth-child(2)::before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.comment-item:nth-child(3)::before {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-user {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    font-size: 0.9rem;
    word-break: break-word;
}

.comment-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 8px;
}

/* 评论提示框 */
.comment-notice {
    padding: 15px 20px;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6f0 100%);
    border-radius: 10px;
    border-left: 4px solid #ff6b9d;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.8;
    margin-top: 15px;
}

.comment-notice p {
    margin: 5px 0;
}

.comment-notice .notice-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

/* 空评论提示 */
.comment-list:empty::after {
    content: '暂无评论，快来抢沙发吧~';
    display: block;
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 0.9rem;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ========== 去下单按钮样式 - 固定在底部 ========== */

.go-order-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.go-order-btn .btn-primary {
    width: 100%;
    background: #fff;
    color: #667eea;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.go-order-btn .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.go-order-btn .btn-primary:active {
    transform: translateY(0);
}

/* 详情页内容底部留白，避免被固定按钮遮挡 */
#detail .board-notes,
#detail .comments-section {
    padding-bottom: 80px;
}

.back-btn button {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn button:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .comment-item {
        padding: 12px;
        gap: 10px;
    }
    
    .comment-item::before {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .comments-section {
        padding: 20px 15px;
    }
}
