* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.3) 0%, rgba(255, 192, 203, 0.3) 25%, rgba(255, 218, 224, 0.3) 50%, rgba(230, 190, 255, 0.3) 75%, rgba(255, 182, 193, 0.3) 100%);
    min-height: 100vh;
    color: #2d3748;
}

.header {
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-name {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.brand-slogan {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    padding: 4px 10px;
    background: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    padding: 12px 28px;
    border-radius: 8px;
    background: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.back-link:hover {
    background: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #ff69b4, #ff1493, #ff69b4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1.1em;
}

.error-message {
    display: none;
    background: #fff5f5;
    color: #c53030;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid #feb2b2;
    text-align: center;
    font-size: 14px;
    margin-bottom: 20px;
}

.card-input-section {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.card-input-section label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
}

.card-input-section input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.card-input-section input:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

#cardInfo {
    margin-top: 8px;
    font-size: 13px;
    color: #718096;
}

.start-screen {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.description {
    font-size: 1.1em;
    color: #666;
    margin: 30px 0;
    line-height: 1.8;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff0f5, #ffe4e9);
    border-radius: 15px;
    width: 150px;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.2);
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.feature-text {
    font-size: 0.9em;
    color: #ff1493;
    font-weight: bold;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.5);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff69b4, #ff1493, #ff69b4);
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

.question-card {
    display: none;
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    animation: fadeIn 0.5s;
}

.question-card.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-number {
    color: #ff1493;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-weight: bold;
}

.question-text {
    font-size: 1.5em;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 30px;
    line-height: 1.6;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.option:hover {
    border-color: #ff69b4;
    background: linear-gradient(135deg, #fff0f5, #ffe4e9);
    transform: translateX(5px);
}

.option.selected {
    border-color: #ff1493;
    background: linear-gradient(135deg, #ffb6c1, #ffc0cb);
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 20px;
}

.nav-btn {
    padding: 12px 30px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-btn:hover:not(:disabled) {
    border-color: #ff69b4;
    color: #ff69b4;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: #ff69b4;
    color: white;
    border-color: #ff69b4;
}

.nav-btn.primary:hover:not(:disabled) {
    background: #ff1493;
    border-color: #ff1493;
}

.submit-section {
    display: none;
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    padding: 16px 60px;
    font-size: 18px;
    background: #ff69b4;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.submit-btn:hover {
    background: #ff1493;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 20, 147, 0.4);
}

/* 魔法过渡动画 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.95), rgba(255, 192, 203, 0.95), rgba(230, 190, 255, 0.95));
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading.active {
    display: flex;
    animation: fadeIn 0.5s;
}

.magic-circle {
    width: 200px;
    height: 200px;
    position: relative;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.magic-star {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 1.5s ease-in-out infinite;
}

.magic-star:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.magic-star:nth-child(2) { top: 25%; right: 10%; animation-delay: 0.2s; }
.magic-star:nth-child(3) { top: 50%; right: 0; transform: translateY(-50%); animation-delay: 0.4s; }
.magic-star:nth-child(4) { bottom: 25%; right: 10%; animation-delay: 0.6s; }
.magic-star:nth-child(5) { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 0.8s; }
.magic-star:nth-child(6) { bottom: 25%; left: 10%; animation-delay: 1s; }
.magic-star:nth-child(7) { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 1.2s; }
.magic-star:nth-child(8) { top: 25%; left: 10%; animation-delay: 1.4s; }

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.5); }
}

.magic-text {
    margin-top: 40px;
    font-size: 1.5em;
    color: #ff1493;
    font-weight: bold;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: sparkleFloat 3s ease-in-out infinite;
}

@keyframes sparkleFloat {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.spinner {
    border: 3px solid #f0f0f0;
    border-top: 3px solid #ff69b4;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-section {
    display: none;
}

.result-section.active {
    display: block;
    animation: fadeIn 0.5s;
}

.result-card {
    background: linear-gradient(135deg, #fff0f5, #ffe4e9, #ffc0cb);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3);
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.character-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 5px solid #ff69b4;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.4);
    display: block;
}

.character-name {
    font-size: 2em;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: bold;
}

.match-score {
    font-size: 1.2em;
    color: #ff1493;
    font-weight: bold;
}

.dimensions {
    margin: 30px 0;
}

.dimension-item {
    margin-bottom: 15px;
}

.dimension-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
    font-weight: 500;
}

.dimension-bar {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.dimension-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff69b4, #ff1493, #ff69b4);
    transition: width 1s;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

.info-section {
    margin: 30px 0;
}

.info-title {
    font-size: 1.2em;
    color: #ff1493;
    margin-bottom: 15px;
    font-weight: bold;
}

.info-content {
    color: #555;
    line-height: 1.8;
}

.info-list {
    list-style: none;
    padding-left: 0;
}

.info-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.info-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ff69b4;
    font-weight: bold;
    font-size: 1.2em;
}

.blessing {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ff69b4;
    font-style: italic;
    color: #555;
    line-height: 1.8;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.2);
    margin-top: 20px;
}

.other-matches {
    margin-top: 30px;
}

.other-match-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 3px solid #ff69b4;
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
}

.other-match-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #ff1493;
    margin-bottom: 5px;
}

.other-match-score {
    color: #666;
    font-size: 0.9em;
}

.reset-btn {
    margin-top: 30px;
    padding: 12px 40px;
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.reset-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.footer {
    background: #f7fafc;
    border-top: 2px solid #e2e8f0;
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    color: #718096;
    font-size: 13px;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2em;
    }
    
    .question-card {
        padding: 25px 20px;
    }
    
    .question-text {
        font-size: 1.2em;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .features {
        gap: 15px;
    }
    
    .feature-item {
        width: 120px;
    }
}
