* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
}

.header-top {
    position: absolute;
    top: 20px;
    right: 20px;
}

.language-selector {
    position: relative;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 120px;
    display: none;
    overflow: hidden;
    z-index: 1000;
}

.lang-menu.show {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: white;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.9em;
}

.lang-option:hover {
    background: #f0f0f0;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 40px;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: #34495e;
}

/* 预览区域 */
.preview-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    min-height: 400px;
    align-items: start;
}

.product-preview {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.product-gallery {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.preview-placeholder {
    background: white;
    border-radius: 15px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.preview-box {
    width: 100%;
    max-width: 400px;
    height: 300px;
    margin: 0 auto 20px;
    position: relative;
    background: #ecf0f1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-frame {
    width: 85%;
    height: 80%;
    border: 10px solid #2c3e50;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.preview-tray {
    width: 100%;
    height: 100%;
    background: rgba(200, 200, 200, 0.6);
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 3px;
    padding: 3px;
    box-sizing: border-box;
}

.tray-cell {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.preview-text {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.preview-colors {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.preview-colors .option-group {
    padding: 12px;
}

.preview-colors .color-options {
    gap: 8px;
}

.preview-colors .color-btn {
    width: 34px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid transparent;
}

.preview-colors .color-btn:hover {
    transform: scale(1.03);
}

.preview-colors .color-btn.active {
    border-color: #2c3e50;
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .preview-section {
        padding: 20px;
    }
    .preview-colors .color-btn {
        width: 28px;
        height: 18px;
    }
}

/* 实拍效果图轮播 */
.gallery-container {
    background: white;
    border-radius: 15px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.gallery-window {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 300px;
    margin: 0 auto 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.gallery-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.gallery-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.gallery-indicator:hover {
    background: #adb5bd;
    transform: scale(1.2);
}

.gallery-indicator.active {
    background: #667eea;
    width: 24px;
    border-radius: 5px;
}

.gallery-text {
    color: #7f8c8d;
    font-size: 1.1em;
    margin-bottom: 12px;
}

/* 定制选项区域 */
.customize-section {
    background: white;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.options-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.options-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.option-group {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.option-group:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.option-label {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.option-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-select:hover {
    border-color: #667eea;
}

.option-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 颜色选项 */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.color-btn {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.color-btn.active {
    border-color: #2c3e50;
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 游戏卡类型选项 */
.card-type-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.card-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card-type-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.card-qty-input {
    width: 80px;
    padding: 8px 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95em;
    text-align: right;
}

.card-qty-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.qty-limit-hint {
    margin-top: 8px;
    color: #6c757d;
    font-size: 0.9em;
}

.card-type-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-type-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.card-type-option input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.card-type-option input[type="radio"]:checked + .card-type-label {
    color: #667eea;
    font-weight: 600;
}

/* 產品簡介樣式 */
.product-intro {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin: 0 40px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-intro h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.product-intro h3 {
    font-size: 1.5em;
    margin: 30px 0 15px;
    color: #34495e;
}

.product-intro p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #495057;
}

.product-intro ul {
    list-style-type: disc;
    padding-left: 30px;
    margin-bottom: 20px;
}

.product-intro li {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 10px;
    color: #495057;
}

.card-type-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.card-type-label {
    font-size: 1em;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 规格显示 */
.specs-display {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.specs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.spec-item {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.spec-label {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
}

.spec-value {
    color: #667eea;
    font-weight: 600;
    font-size: 1.05em;
}

/* 立即定制按钮 */
.customize-action {
    margin-top: 40px;
    text-align: center;
    padding: 20px 0;
}

.customize-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    text-transform: none;
}

.customize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.customize-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* 文本输入框样式 */
.text-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #495057;
    transition: all 0.3s ease;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-input.is-invalid {
    border-color: #E74C3C;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.text-input.is-valid {
    border-color: #2ECC71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.15);
}

.input-error {
    margin-top: 8px;
    color: #E74C3C;
    font-size: 0.9em;
    min-height: 1em;
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .options-container {
        grid-template-columns: 1fr;
    }

    .preview-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 30px 20px;
    }

    .header-top {
        top: 15px;
        right: 15px;
    }

    header h1 {
        font-size: 2em;
        padding-right: 80px;
    }

    main {
        padding: 20px;
    }

    .options-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .options-left,
    .options-right {
        gap: 20px;
    }

    .card-type-options {
        grid-template-columns: 1fr;
    }

    .preview-box {
        height: 300px;
    }

    .gallery-container {
        padding: 20px;
    }

    .gallery-window {
        max-width: 100%;
        height: 55vh;
    }
    .preview-colors {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-indicator {
        width: 14px;
        height: 14px;
    }
}

/* 图片灯箱 */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox.show {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 36px;
    color: #2c3e50;
    cursor: pointer;
}

