/* 预售页面样式 */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="presaleGrid" width="12" height="12" patternUnits="userSpaceOnUse"><path d="M 12 0 L 0 0 0 12" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/><circle cx="6" cy="6" r="0.8" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100" height="100" fill="url(%23presaleGrid)"/></svg>');
    opacity: 0.4;
    animation: presaleGridMove 35s linear infinite;
}

/* 动态预售背景效果 */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    animation: presaleGlow 18s ease-in-out infinite;
}

@keyframes presaleGridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(12px, 12px); }
}

@keyframes presaleGlow {
    0%, 100% { 
        opacity: 0.4; 
        transform: scale(1) rotate(0deg); 
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05) rotate(2deg); 
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.gradient-text {
    background: linear-gradient(45deg, #ffd700, #ffed4e, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: presaleTextGradient 3s ease-in-out infinite;
}

@keyframes presaleTextGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* 预售进度 */
.presale-progress {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-label {
    font-weight: 500;
}

.progress-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 价格信息 */
.price-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.price-current {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
}

.price-currency {
    font-size: 1.1rem;
    font-weight: 500;
}

.price-original {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.original-price {
    text-decoration: line-through;
    opacity: 0.6;
}

.discount {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 倒计时 */
.countdown {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.countdown-label {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    min-width: 60px;
}

.time-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffd700;
    line-height: 1;
}

.time-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Hero Image */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-image {
    max-width: 100%;
    height: auto;
    z-index: 2;
    position: relative;
}

/* 使用首页3D模型的基础样式 */
.phone-3d {
    width: 400px;
    height: auto;
    filter: drop-shadow(0 25px 50px rgba(102, 126, 234, 0.4));
    animation: phone3DFloat 8s ease-in-out infinite;
}

@keyframes phone3DFloat {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg) rotateX(0deg);
        filter: drop-shadow(0 25px 50px rgba(102, 126, 234, 0.4));
    }
    50% {
        transform: translateY(-12px) rotateY(3deg) rotateX(1deg);
        filter: drop-shadow(0 35px 70px rgba(118, 75, 162, 0.5));
    }
}

.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.decoration-dots {
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 2px, transparent 2px);
    background-size: 20px 20px;
    animation: float 6s ease-in-out infinite;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Benefits Section */
.benefits {
    padding: 80px 0;
    background: #f8fafc;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.benefit-icon svg {
    width: 28px;
    height: 28px;
}

.benefit-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.benefit-description {
    color: #64748b;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    color: #667eea;
    opacity: 0.3;
    font-family: serif;
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-text {
    font-style: italic;
    color: #4a5568;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.author-title {
    color: #64748b;
    font-size: 0.9rem;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: #f8fafc;
}

.faq-list {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.order-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row.total {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Modal UI enhancements */
.price-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}
.chip-direct {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}
.chip-invite {
    background: #ecfeff;
    color: #0e7490;
    border-color: #a5f3fc;
}
.input-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.stepper-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
}
.stepper-btn:hover {
    background: #f8fafc;
}
.form-group input[type="number"],
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}
.price-badge {
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: #f1f5f9;
    color: #334155;
}
.price-badge.badge-direct {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}
.price-badge.badge-invite {
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
}
.summary-save {
    margin-top: 8px;
    color: #0f766e;
    font-weight: 500;
}

/* Contrast fixes for modal on light background */
.modal-content,
.modal-content .modal-body,
.modal-content .order-summary,
.modal-content .order-summary .summary-row span,
.modal-content label,
.modal-content .input-hint,
.modal-content #summaryUnit,
.modal-content #summaryTotal,
.modal-content #summaryQuantity {
    color: #1f2937 !important; /* Override global body white text */
}
.modal-content .summary-row.total span {
    color: #111827 !important;
}
.modal-content input[type="number"],
.modal-content input[type="text"] {
    color: #0f172a !important;
    background: #ffffff;
}
.modal-content input::placeholder {
    color: #64748b !important;
}

/* Footer styles removed to use global common.css footer */

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .countdown-timer {
        gap: 0.5rem;
    }
    
    .time-unit {
        min-width: 50px;
        padding: 0.75rem 0.5rem;
    }
    
    .time-value {
        font-size: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}