/* 全局样式 */
:root {
    --primary-color: #d4a550;
    --secondary-color: #8B4513;
    --accent-color: #e74c3c;
    --background-dark: #2d1b69;
    --background-light: #f8f9fa;
    --text-primary: #f8f9fa;
    --text-secondary: #e9ecef;
    --border-color: #495057;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #4a308a 0%, #2d1b69 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: rgba(74, 48, 138, 0.85);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(212, 165, 80, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(212, 165, 80, 0.2);
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#user-balance {
    color: var(--primary-color);
    font-weight: bold;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #c09242;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

/* 主内容区域 */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    color: white;
}

/* 横幅部分 */
.banner-section {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #6a4fb0 0%, #4a308a 70%);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.banner-content {
    position: relative;
    z-index: 2;
    color: white;
}

.banner-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 25px rgba(212, 165, 80, 0.9);
    background: linear-gradient(to right, #d4a550, #e6b325, #f0c346);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

.banner-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.temple-animation {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 2rem auto;
}

.digital-lotus {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 165, 80, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    position: relative;
    animation: rotate 10s linear infinite;
}

.digital-lotus::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #e6b325 0%, #d4a550 70%);
    border-radius: 50%;
    box-shadow: 0 0 30px #e6b325, 0 0 60px rgba(230, 179, 37, 0.5);
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { transform: translate(-50%, -50%) scale(1); }
    to { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glow {
    from { text-shadow: 0 0 10px #d4a550, 0 0 20px #d4a550; }
    to { text-shadow: 0 0 20px #d4a550, 0 0 30px #e6b325, 0 0 40px #f0c346; }
}

.light-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 灯型选择部分 */
.lamps-section,
.prayer-wall-section,
.account-section {
    padding: 3rem 0;
    color: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(212, 165, 80, 0.5);
}

.lamps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.lamp-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.lamp-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(212, 165, 80, 0.2), rgba(139, 69, 19, 0.2));
    z-index: -1;
}

.lamp-item:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--primary-color);
    background: rgba(212, 165, 80, 0.25);
    box-shadow: 0 10px 30px rgba(212, 165, 80, 0.4), 0 0 20px rgba(212, 165, 80, 0.3) inset;
}

.lamp-item.selected {
    border-color: var(--primary-color);
    background: rgba(212, 165, 80, 0.3);
    box-shadow: 0 0 25px rgba(212, 165, 80, 0.6), 0 0 20px rgba(212, 165, 80, 0.3) inset;
}

.lamp-detail-panel {
    display: none;
    background: rgba(74, 48, 138, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-color);
}

.lamp-item.selected .lamp-detail-panel {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lamp-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.lamp-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.lamp-meaning {
    color: #ccc;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.lamp-price {
    color: var(--accent-color);
    font-weight: bold;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.package-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.package-item:hover {
    background: rgba(212, 165, 80, 0.1);
}

.package-item.selected {
    border-color: var(--primary-color);
    background: rgba(212, 165, 80, 0.15);
}

.package-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.package-duration {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.package-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0.5rem 0;
}

.package-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.package-tag {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* 祈愿表单 */
.prayer-form {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 80, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(212, 165, 80, 0.5);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* 祈福墙 */
.prayer-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.prayer-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 80, 0.2);
}

.prayer-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.prayer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.prayer-user {
    flex: 1;
}

.prayer-username {
    font-weight: bold;
    color: var(--primary-color);
}

.prayer-time {
    font-size: 0.8rem;
    color: #ccc;
}

.prayer-lamp {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.prayer-lamp i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.prayer-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.prayer-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ccc;
    font-size: 0.9rem;
}

/* 个人中心 */
.account-content {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 80, 0.3);
}

.user-card {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 1.5rem;
    border: 3px solid var(--primary-color);
}

.user-details h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.user-details p {
    margin: 0.25rem 0;
    color: #ccc;
}

.account-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: linear-gradient(135deg, #6a4fb0, #4a308a);
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-content.wide {
    max-width: 800px;
}

.packages-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.package-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.package-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(212, 165, 80, 0.1), rgba(139, 69, 19, 0.1));
    z-index: -1;
}

.package-item:hover {
    background: rgba(212, 165, 80, 0.25);
}

.package-item.selected {
    border-color: var(--primary-color);
    background: rgba(212, 165, 80, 0.3);
    box-shadow: 0 0 15px rgba(212, 165, 80, 0.5);
}

.package-savings {
    color: var(--success-color);
    font-weight: bold;
    margin: 0.5rem 0;
}

.package-description {
    font-size: 0.85rem;
    color: #ccc;
    margin-top: 0.5rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.payment-options {
    margin: 1.5rem 0;
}

.payment-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.payment-option:hover {
    background: rgba(212, 165, 80, 0.2);
    transform: translateX(5px);
}

.payment-option i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.total-amount {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 1rem;
}

.login-options {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.login-option {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-option:hover {
    background: rgba(212, 165, 80, 0.2);
    transform: translateY(-5px);
}

.login-option i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.login-form {
    margin-top: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

#send-code-btn {
    white-space: nowrap;
}

#send-code-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .lamps-grid,
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .user-card {
        flex-direction: column;
        text-align: center;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .account-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 订单卡片样式 */
.order-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.order-lamp {
    display: flex;
    align-items: center;
}

.order-lamp i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.order-status {
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.status-pending { background: #ffc107; color: #212529; }
.status-lighting { background: var(--primary-color); color: white; }
.status-completed { background: var(--success-color); color: white; }
.status-cancelled { background: var(--danger-color); color: white; }

.order-prayer {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #ccc;
}

.order-time {
    font-size: 0.8rem;
    color: #999;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}