/* purchase.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #f8fafc;
    --secondary: #f59e0b;
    --accent: #f59e0b;
    --accent-alt: #d97706;
    --text: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --glow: 0 0 20px rgba(245, 158, 11, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--primary);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.03), transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(217, 119, 6, 0.03), transparent 30%);
    z-index: -2;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.logo-accent {
    color: var(--accent);
    position: relative;
}

/* 修改STAR·NUCLEUS底下的黑色线条为点状动画效果 */
.logo-accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    background-size: 200% 100%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.logo:hover .logo-accent::after {
    transform: scaleX(1);
    transform-origin: left;
    animation: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.nav-link:hover::before {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--text);
    position: relative;
}

.hero-highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero-highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(245, 158, 11, 0.3);
    border-radius: 2px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.2), transparent);
    margin: 80px 0;
    position: relative;
}

.divider-icon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

/* Purchase Section */
.purchase-section {
    padding: 100px 0;
    background: var(--primary);
}

.purchase-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.summary-title, .payment-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
    position: relative;
    padding-bottom: 15px;
}

.summary-title::after, .payment-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
    border-bottom: none;
}

.item-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.item-value {
    font-weight: 600;
    color: var(--text);
    font-size: 1.1rem;
}

.price {
    color: var(--accent);
    font-size: 1.3rem;
}

.total {
    font-size: 1.3rem;
    padding-top: 20px;
    border-top: 2px solid var(--border);
    margin-top: 20px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-option {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.payment-option:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-label {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    width: 100%;
}

.payment-icon {
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    transition: all 0.4s ease;
}

.payment-option:hover .payment-icon {
    border-color: var(--accent);
    transform: scale(1.05);
}

.payment-info {
    flex: 1;
}

.payment-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.payment-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Selected payment method */
.payment-option input[type="radio"]:checked + .payment-label .payment-icon {
    border-color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
    box-shadow: var(--glow);
}

.payment-option input[type="radio"]:checked + .payment-label {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent);
}

.purchase-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.confirm-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    color: white;
    padding: 18px 40px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: var(--glow);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.confirm-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.confirm-button:hover::before {
    left: 100%;
}

.confirm-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.cancel-button {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    padding: 18px 40px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.4s ease;
    border: 1px solid rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cancel-button:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* Error Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    /* 移除 overflow: hidden 以允许页面滚动 */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease;
    overflow: hidden;
    max-height: 80vh;
    /* 添加滚动条 */
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: rgba(245, 158, 11, 0.1);
    padding: 30px 40px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0;
    line-height: 1.4;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 25px;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: var(--accent);
}

.modal-body {
    padding: 40px;
}

.error-icon {
    font-size: 3rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 20px;
}

.error-message {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 40px;
    font-weight: 600;
}

.error-reasons {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.reason-item {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.4s ease;
}

.reason-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
}

.reason-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reason-title::before {
    content: '•';
    font-size: 1.5rem;
}

.reason-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 20px 40px 40px;
    border-top: 1px solid var(--border);
    background: rgba(248, 250, 252, 0.8);
}

.modal-button, .contact-button {
    padding: 16px 36px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.4s ease;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-alt));
    color: white;
    box-shadow: var(--glow);
}

.modal-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.contact-button {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.contact-button:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* Footer */
footer {
    background: var(--secondary);
    background: rgba(245, 158, 11, 0.05);
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
    position: relative;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-column h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
    position: relative;
    padding-bottom: 15px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-link {
    margin-bottom: 20px;
}

.footer-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.footer-link a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-link-icon {
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.4s ease;
}

.footer-link a:hover .footer-link-icon {
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
}

.copyright {
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.4s ease;
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--accent);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .purchase-container {
        grid-template-columns: 1fr;
        padding: 40px 30px;
    }
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    .hero {
        padding: 140px 0 80px;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .purchase-container {
        padding: 30px 20px;
    }
    .nav-links {
        display: none;
    }
    .purchase-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
    }
    .hero-title {
        font-size: 2.3rem;
    }
    .summary-title, .payment-title {
        font-size: 1.8rem;
    }
    .confirm-button, .cancel-button {
        width: 100%;
        justify-content: center;
    }
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}