:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #2d3748;
    --text-light: #718096;
    --accent-color: #667eea;
    --danger-color: #fc8181;
    --success-color: #68d391;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Page Transitions */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    width: 100%;
}

.page.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    text-align: center;
    transition: transform 0.3s ease;
}

.glass-panel.wide {
    max-width: 800px;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

p.description {
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* Buttons */
.primary-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 500;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: transparent;
    border: 1px solid #cbd5e0;
    color: var(--text-light);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #e2e8f0;
    color: #cbd5e0;
}

/* Info Grid */
.info-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 2.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-weight: 500;
}

/* Test Page Specifics */
.header {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

#progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 50px;
    text-align: right;
}

.question-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.question-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-main);
    line-height: 1.4;
}

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

.option-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid transparent;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-btn:hover {
    background: white;
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.option-btn.selected {
    background: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.option-label {
    font-weight: 700;
    color: var(--accent-color);
    min-width: 40px;
}

.option-desc {
    color: var(--text-light);
    font-size: 0.95rem;
}

.navigation-buttons {
    display: flex;
    justify-content: flex-start;
}

/* Result Page */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
    margin-bottom: 30px;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.score-card {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.score-card h3 {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.score-card span {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
}

.score-card .status-text {
    font-size: 1rem;
    font-weight: 600;
}

.section-header {
    margin-top: 30px;
    margin-bottom: 15px;
}

.section-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.analysis-card {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.analysis-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.analysis-card p {
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 10px;
}

.analysis-card ul {
    margin: 10px 0;
    padding-left: 20px;
}

.analysis-card li {
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 8px;
}

.trait-tag {
    display: inline-block;
    padding: 6px 12px;
    margin: 5px 5px 5px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.trait-tags-container {
    margin-top: 15px;
}

.personality-type-badge {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    background: var(--primary-gradient);
    color: white;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
}

.recommendations-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.recommendation-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
}

.recommendation-item:last-child {
    margin-bottom: 0;
}

.recommendation-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.recommendation-item p {
    line-height: 1.8;
    color: var(--text-main);
    margin: 0;
}

.recommendation-item ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.recommendation-item li {
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 5px;
}

.growth-section {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.growth-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.growth-item:last-child {
    margin-bottom: 0;
}

.growth-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.growth-content {
    flex: 1;
}

.growth-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.growth-content p {
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
    font-size: 0.9rem;
}

.dimension-list {
    text-align: left;
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.dimension-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.d-name {
    font-weight: 600;
}

.d-score {
    font-weight: bold;
}

.d-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-normal { background: #e6fffa; color: #2c7a7b; }
.status-warning { background: #fffaf0; color: #c05621; }
.status-danger { background: #fff5f5; color: #c53030; }

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-light);
    background: rgba(255, 245, 245, 0.8);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(252, 129, 129, 0.2);
    margin-bottom: 30px;
    text-align: left;
}

/* Activation Page */
.activation-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
    width: 100%;
}

.activation-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s;
    font-family: 'Noto Sans SC', sans-serif;
    background: rgba(255, 255, 255, 0.7);
}

.activation-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.activation-input::placeholder {
    color: #cbd5e0;
}

.activation-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.activation-message.success {
    background: #e6fffa;
    color: #2c7a7b;
    border: 1px solid #81e6d9;
}

.activation-message.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fc8181;
}

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

.activation-tips {
    margin-top: 20px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.activation-tips p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-panel { padding: 30px 20px; }
    h1 { font-size: 2rem; }
    .result-summary { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }
    .options-grid { gap: 10px; }
    .option-btn { padding: 12px 15px; }
    .option-desc { font-size: 0.85rem; }
    .chart-container { height: 280px; }
    .section-header h3 { font-size: 1rem; }
    .analysis-card { padding: 15px; }
    .recommendation-item { padding: 12px; }
    .growth-item { padding: 12px; }
}

@media (max-width: 480px) {
    .result-summary { 
        grid-template-columns: 1fr;
    }
    .score-card span {
        font-size: 1.2rem;
    }
    .trait-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    .personality-type-badge {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}
