/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 特性卡片 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* 说明区域 */
.info-section {
    text-align: center;
    margin-bottom: 40px;
}

.info-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 0.95rem;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.info-list {
    list-style: none;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.info-list li {
    margin: 5px 0;
}

.info-list li::before {
    content: '* ';
}

/* 人格类型选择 */
.type-selection {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.type-selection h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .type-grid {
        grid-template-columns: 1fr;
    }
}

.type-category {
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
}

.type-category.purple {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-color: #c084fc;
}

.type-category.green {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #4ade80;
}

.type-category.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #60a5fa;
}

.type-category.yellow {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    border-color: #facc15;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.purple .category-dot { background: #9333ea; }
.green .category-dot { background: #16a34a; }
.blue .category-dot { background: #2563eb; }
.yellow .category-dot { background: #ca8a04; }

.type-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.type-btn.selected {
    border-width: 3px;
    font-weight: 600;
}

.purple .type-btn.selected {
    border-color: #9333ea;
    background: #f3e8ff;
}

.green .type-btn.selected {
    border-color: #16a34a;
    background: #dcfce7;
}

.blue .type-btn.selected {
    border-color: #2563eb;
    background: #dbeafe;
}

.yellow .type-btn.selected {
    border-color: #ca8a04;
    background: #fef9c3;
}

.type-code {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.type-name {
    font-size: 0.8rem;
    color: #666;
}

.unknown-type {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.unknown-type a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.unknown-type a:hover {
    text-decoration: underline;
}

/* 选中类型展示区域 */
.selected-type-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    text-align: center;
}

.selected-type-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.selected-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.selected-info h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.selected-info p {
    color: #666;
}

.progress-preview {
    max-width: 500px;
    margin: 0 auto 30px;
}

.progress-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

.start-test-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.start-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* 测试页面样式 */
.test-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.test-header {
    text-align: center;
    margin-bottom: 40px;
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.test-progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.test-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.test-progress-text {
    font-size: 0.9rem;
    color: #666;
    min-width: 50px;
}

.question-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.question-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.8;
    margin-bottom: 25px;
}

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

.option-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f5f3ff;
}

.option-btn.selected {
    border-color: #667eea;
    background: #ede9fe;
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.option-btn:hover .option-letter,
.option-btn.selected .option-letter {
    background: #667eea;
    color: white;
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.nav-btn {
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.nav-btn.prev {
    background: #e5e7eb;
    color: #666;
}

.nav-btn.prev:hover {
    background: #d1d5db;
}

.nav-btn.next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-btn.next:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 结果页面样式 */
.result-container {
    max-width: 900px;
    margin: 0 auto;
}

.result-header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.result-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.result-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.result-subtitle {
    color: #666;
    margin-bottom: 30px;
}

/* 阶段诊断 */
.stage-diagnosis {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.stage-diagnosis h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.stage-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.stage-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.stage-info {
    text-align: left;
}

.stage-name {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stage-score {
    font-size: 1.2rem;
    color: #666;
}

.stage-progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.stage-progress-bar {
    height: 16px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.stage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    transition: width 1s ease;
}

.stage-markers {
    display: flex;
    justify-content: space-between;
    position: relative;
    top: -26px;
    margin-bottom: -10px;
    padding: 0 8px;
}

.stage-marker {
    width: 12px;
    height: 12px;
    background: white;
    border: 3px solid #cbd5e1;
    border-radius: 50%;
}

.stage-marker.active {
    border-color: #667eea;
    background: #667eea;
}

.stage-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

/* 属性面板 */
.attributes-panel {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.attributes-panel h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.attribute-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.attribute-name {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.attribute-bar {
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.attribute-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.attribute-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* 天赋图谱 */
.talent-map {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.talent-map h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.talent-section {
    margin-bottom: 30px;
}

.talent-section:last-child {
    margin-bottom: 0;
}

.talent-section h4 {
    font-size: 1.1rem;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.talent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.talent-tag {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.career-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.career-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
}

/* 灵魂伴侣 */
.soulmate-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.soulmate-section h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.soulmate-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.soulmate-item {
    text-align: center;
    padding: 25px;
    background: #f8fafc;
    border-radius: 16px;
    min-width: 150px;
}

.soulmate-rank {
    font-size: 2rem;
    margin-bottom: 10px;
}

.soulmate-type {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.soulmate-name {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.soulmate-match {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

/* 深度解析 */
.deep-analysis {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.deep-analysis h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
}

.analysis-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.analysis-tab {
    padding: 10px 20px;
    border: none;
    background: #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.analysis-tab:hover {
    background: #d1d5db;
}

.analysis-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.analysis-content {
    background: #f8fafc;
    border-radius: 16px;
    padding: 30px;
}

.analysis-section {
    display: none;
}

.analysis-section.active {
    display: block;
}

.analysis-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.analysis-section p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 保存提示 */
.save-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    margin-bottom: 30px;
}

.save-notice-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.save-notice p {
    color: #92400e;
    margin-bottom: 5px;
}

.save-notice small {
    color: #a16207;
}

/* 页脚 */
.footer {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .type-selection {
        padding: 25px;
    }
    
    .stage-display {
        flex-direction: column;
        text-align: center;
    }
    
    .soulmate-list {
        flex-direction: column;
        align-items: center;
    }
    
    .analysis-tabs {
        flex-direction: column;
    }
    
    .analysis-tab {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease infinite;
}

/* 核销码弹窗样式 */
.redeem-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.redeem-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

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

.redeem-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.redeem-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.redeem-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.redeem-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.redeem-modal-body {
    padding: 30px;
}

.redeem-desc {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.redeem-input-group {
    margin-bottom: 20px;
}

.redeem-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.3rem;
    text-align: center;
    letter-spacing: 2px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #333;
}

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

.redeem-input::placeholder {
    color: #bbb;
    font-weight: 400;
}

.redeem-error {
    color: #ef4444;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 15px;
    min-height: 20px;
}

.redeem-success {
    color: #10b981;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 15px;
    min-height: 20px;
}

.redeem-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.redeem-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.redeem-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.redeem-submit-btn span {
    pointer-events: none;
}

.redeem-modal-footer {
    background: #f8fafc;
    padding: 15px 30px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.redeem-modal-footer p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

/* 核销码输入自动格式化 */
.redeem-input.valid {
    border-color: #10b981;
    background: #f0fdf4;
}

.redeem-input.invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

/* 后台管理入口 */
.admin-entry {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.admin-entry a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.admin-entry a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.admin-icon {
    font-size: 1.1rem;
}
