@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --accent-color: #4facfe;
    --particle-color: 102, 126, 234;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
}

body {
    font-family: 'Poppins', 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 100px rgba(102, 126, 234, 0.2),
        inset 0 0 60px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.glass-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.logo-text {
    font-size: 2.5em;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.logo-badge {
    background: var(--secondary-gradient);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.title {
    color: var(--text-primary);
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1em;
    font-weight: 300;
    letter-spacing: 1px;
}

.progress-section {
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.5s ease-out;
    position: relative;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
    text-align: center;
}

.separator {
    color: var(--text-muted);
    margin: 0 5px;
}

.hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95em;
    font-weight: 300;
    font-style: italic;
}

.quiz-section {
    margin-bottom: 40px;
}

.question-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-number {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.question-number span {
    color: #4facfe;
    font-weight: 700;
}

.question-text {
    color: var(--text-primary);
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 20px 25px;
    border-radius: 15px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
    font-weight: 400;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.option:hover::before {
    transform: scaleY(1);
}

.option:active {
    transform: translateX(5px);
}

.result-section {
    display: none;
    animation: fadeInUp 0.8s ease-out;
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--secondary-gradient);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 15px 40px rgba(240, 147, 251, 0.4);
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-icon {
    font-size: 2em;
    animation: wiggle 1s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.result-text {
    font-size: 1.3em;
    font-weight: 600;
    color: white;
}

.result-main {
    background: var(--primary-gradient);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}

.result-main::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 15s linear infinite;
}

.result-type-container {
    position: relative;
    z-index: 1;
}

.result-type-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    margin-bottom: 20px;
    font-weight: 500;
}

.result-type {
    margin-bottom: 25px;
}

.type-name {
    display: block;
    font-size: 3.5em;
    font-weight: 800;
    color: white;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.type-desc {
    display: block;
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.match-rate {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.match-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.match-value {
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.system-note {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    margin-top: 25px;
    backdrop-filter: blur(10px);
}

.note-icon {
    font-size: 1.5em;
}

.note-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
    text-align: left;
}

.result-interpretation,
.dimensions,
.warning,
.author-note {
    margin-bottom: 35px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
}

.title-icon {
    font-size: 1.3em;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.interpretation-text,
.warning-text,
.author-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05em;
    margin-bottom: 15px;
}

.dimensions-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dimension-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.dimension-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dimension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dimension-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1em;
}

.dimension-value {
    font-weight: 700;
    color: #4facfe;
    font-size: 1.2em;
}

.dimension-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.dimension-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 1s ease-out;
    position: relative;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

.dimension-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.restart-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto;
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.4);
    position: relative;
    overflow: hidden;
}

.restart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.restart-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(79, 172, 254, 0.6);
}

.restart-btn:hover::before {
    left: 100%;
}

.restart-btn:active {
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.3em;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .glass-card {
        padding: 30px 20px;
    }

    .title {
        font-size: 2em;
    }

    .logo-text {
        font-size: 2em;
    }

    .question-text {
        font-size: 1.4em;
    }

    .type-name {
        font-size: 2.5em;
    }

    .type-desc {
        font-size: 1.2em;
    }

    .result-badge {
        flex-direction: column;
        gap: 10px;
    }

    .progress-container {
        flex-direction: column;
        gap: 10px;
    }

    .dimensions-chart {
        gap: 15px;
    }

    .dimension-item {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .glass-card {
        padding: 25px 15px;
        border-radius: 20px;
    }

    .title {
        font-size: 1.6em;
    }

    .logo-text {
        font-size: 1.5em;
    }

    .question-text {
        font-size: 1.2em;
    }

    .option {
        padding: 15px;
        font-size: 1em;
    }

    .type-name {
        font-size: 2em;
    }

    .section-title {
        font-size: 1.2em;
    }
}