* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Comic Neue', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6f0 100%);
    min-height: 100vh;
    position: relative;
}
body::before {
    content: "😜 🤪 🥳 😎 🤓 🧐";
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 24px;
    opacity: 0.1;
    pointer-events: none;
    white-space: pre;
    z-index: 0;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #ffb347;
    border-radius: 10px;
}

.app-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 245, 220, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 2px dashed #ffb347;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff8c42, #ff3c6f);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    transform: rotate(-2deg);
}
.logo a img {
    width: 60px;
    height: 60px;
}
.top-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.desktop-nav {
    display: flex;
    gap: 20px;
}
.nav-link {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b4c2c;
    cursor: pointer;
    padding: 6px 0;
    transition: 0.2s;
    border-bottom: 2px solid transparent;
}
.nav-link.active {
    color: #ff8c42;
    border-bottom-color: #ff8c42;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #ff8c42;
    border-radius: 3px;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #fff9ef;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}
.side-menu.open {
    left: 0;
}
.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    border-bottom: 2px dashed #ffb347;
}
.side-menu-title {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff8c42, #ff3c6f);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.close-menu {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #ff8c42;
    line-height: 1;
}
.side-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}
.side-nav-link {
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6b4c2c;
    padding: 12px 0;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid #ffe0b5;
}
.side-nav-link:active {
    color: #ff8c42;
}
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 999;
    display: none;
}
.menu-overlay.show {
    display: block;
}

.views-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
}
.view {
    display: none;
    height: 100%;
}
.active-view {
    display: block;
}
.scroll-area {
    max-width: 1000px;
    margin: 0 auto;
}

/* 首页 */
.home-hero {
    text-align: center;
    margin: 30px 0 40px;
}
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}
.tag {
    background: #ffecb3;
    padding: 6px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c45c00;
}
.hero-quote {
    margin: 20px 0 32px;
}
.quote-line {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3b2c1e;
    margin-bottom: 12px;
}
.quote-sub {
    font-size: 1rem;
    color: #c45c00;
    margin-bottom: 8px;
}
.quote-desc {
    font-size: 0.9rem;
    color: #ff8c42;
    font-style: italic;
}
.btn-start {
    background: #ff8c42;
    border: none;
    padding: 14px 32px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 0 #b45a1c;
}
.btn-start:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #b45a1c;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
    padding-bottom: 40px;
}
.info-card {
    background: rgba(255, 255, 240, 0.9);
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    border-left: 8px solid #ffb347;
}
.info-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #c45c00;
    margin-bottom: 12px;
}
.info-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a3b2c;
}

/* 类型网格 */
.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #c45c00;
    margin: 24px 0 28px;
    text-align: center;
    text-decoration: underline wavy #ffb347;
}
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.type-card {
    background: white;
    border-radius: 32px;
    padding: 24px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: 0.2s;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.type-image {
    width: 250px;
    height: 250px;
    object-fit: cover;
    margin-bottom: 16px;
    border-radius: 20px;
    background-color: #fff5e8;
}
.type-image-placeholder {
    width: 250px;
    height: 250px;
    background: #f0e0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 4rem;
    color: #c45c00;
    border-radius: 20px;
}
.type-code {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ff8c42;
}
.type-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #b45a1c;
    margin: 10px 0 6px;
}
.type-desc {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #6b4c2c;
    margin-top: 8px;
}

/* 测试页 */
.progress-area {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 20px auto 24px;
}
.progress-bar-bg {
    background: #ffe0b5;
    border-radius: 20px;
    height: 10px;
    width: 150px;
    overflow: hidden;
}
.progress-fill {
    width: 0%;
    height: 100%;
    background: #ff8c42;
    border-radius: 20px;
    transition: width 0.3s ease;
}
.question-counter {
    font-size: 0.9rem;
    color: #c45c00;
    font-weight: 600;
    order: -1;
}
.question-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 48px;
    padding: 32px 24px;
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.1);
}
.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 36px;
    color: #2c2b26;
    text-align: center;
}
.options-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
}
.option-btn {
    background: #fff7e8;
    border: 2px solid #ffd7a5;
    padding: 16px 20px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    color: #6b4c2c;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}
.option-btn:active {
    transform: scale(0.96);
    background: #ffecb3;
}
.btn-prev {
    background: rgba(255,255,255,0.8);
    border: 2px solid #ffb347;
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #c45c00;
    cursor: pointer;
}

/* 结果页 */
.result-card {
    max-width: 700px;
    margin: 40px auto;
    background: white;
    border-radius: 48px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15);
    border: 2px solid #ffb347;
}
.result-image-placeholder {
    width: 250px;
    height: 250px;
    background: #f0e0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 4rem;
    color: #c45c00;
    border-radius: 20px;
}
.result-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.result-type {
    font-size: 3rem;
    letter-spacing: 6px;
    font-weight: 800;
    background: linear-gradient(125deg, #ff8c42, #ff3c6f);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}
.result-title {
    font-size: 2rem;
    font-weight: 700;
    color: #c45c00;
    margin: 16px 0 20px;
}
.result-desc {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #6b4c2c;
    margin-bottom: 36px;
}
.result-share-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}
.btn-share, .btn-screenshot, .btn-retest {
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}
.btn-share {
    background: #ff8c42;
    color: white;
}
.btn-screenshot {
    background: #c45c00;
    color: white;
}
.btn-retest {
    background: #fff0e0;
    color: #ff8c42;
    border: 2px solid #ffb347;
    width: 100%;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #ff8c42;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    z-index: 1001;
    opacity: 0;
    transition: 0.2s;
    pointer-events: none;
    white-space: nowrap;
    max-width: 85vw;
    white-space: normal;
    text-align: center;
}
.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .top-bar {
        padding: 12px 16px;
    }
    .views-container {
        padding: 0 16px 16px;
    }
    .types-grid {
        grid-template-columns: 1fr;
    }
    .quote-line {
        font-size: 1.4rem;
    }
    .progress-bar-bg {
        width: 120px;
    }
    .question-text {
        font-size: 1.3rem;
    }
    .result-type {
        font-size: 2.2rem;
    }
    .type-image,
    .type-image-placeholder {
        width: 150px;
        height: 150px;
        font-size: 2.5rem;
    }
    .result-image-placeholder {
        width: 150px;
        height: 150px;
        font-size: 2.5rem;
    }
    .type-code {
        font-size: 1.3rem;
    }
    .type-name {
        font-size: 1rem;
    }
    .result-title {
        font-size: 1.5rem;
    }
    .result-desc {
        font-size: 0.9rem;
    }
    .btn-share, .btn-screenshot {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}