* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 密码保护界面样式 */
.password-protection {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e0e5ec 0%, #ffffff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

/* 背景装饰 */
.password-protection::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5%, 5%) rotate(1deg); }
    50% { transform: translate(0, 10%) rotate(0deg); }
    75% { transform: translate(-5%, 5%) rotate(-1deg); }
}

.password-container {
    background: linear-gradient(135deg, #e6e9ef 0%, #f8f9fa 100%);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 
        8px 8px 16px rgba(174, 174, 192, 0.4),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.password-container:hover {
    box-shadow: 
        12px 12px 24px rgba(174, 174, 192, 0.5),
        -12px -12px 24px rgba(255, 255, 255, 0.9);
}

.password-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(2px 2px 4px rgba(174, 174, 192, 0.6));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.password-container h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.password-container p {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
}

#passwordInput {
    width: 100%;
    padding: 1.125rem 3.5rem 1.125rem 1.25rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    color: #2d3748;
    transition: all 0.3s ease;
    box-shadow: 
        inset 3px 3px 6px rgba(174, 174, 192, 0.3),
        inset -3px -3px 6px rgba(255, 255, 255, 0.8);
}

#passwordInput::placeholder {
    color: #a0aec0;
}

#passwordInput:focus {
    outline: none;
    box-shadow: 
        inset 2px 2px 4px rgba(174, 174, 192, 0.4),
        inset -2px -2px 4px rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(99, 102, 241, 0.3);
}

.input-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    transition: color 0.3s ease;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
}

#passwordInput:focus + .input-icon {
    color: #6366f1;
}

.password-submit {
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 
        5px 5px 10px rgba(174, 174, 192, 0.4),
        -2px -2px 5px rgba(255, 255, 255, 0.8);
}

.btn-text {
    transition: transform 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    transition: transform 0.3s ease;
    font-size: 1.125rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.password-submit:hover .btn-text {
    transform: translateX(-4px);
}

.password-submit:hover .btn-icon {
    transform: translateX(4px);
}

.password-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.password-submit:hover::before {
    left: 100%;
}

.password-submit:hover {
    transform: translateY(-2px);
    box-shadow: 
        8px 8px 16px rgba(174, 174, 192, 0.5),
        -4px -4px 8px rgba(255, 255, 255, 0.9),
        0 4px 12px rgba(99, 102, 241, 0.3);
}

.password-submit:active {
    transform: translateY(0);
    box-shadow: 
        3px 3px 6px rgba(174, 174, 192, 0.4),
        -1px -1px 3px rgba(255, 255, 255, 0.8);
}

.password-hint {
    font-size: 0.875rem;
    color: #718096;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
}

.password-hint::before {
    content: "💡";
    opacity: 0.7;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto 1rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

.search-box {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.search-icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0.8;
}

.main-content {
    flex: 1;
    display: flex;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    gap: 1.5rem;
    padding: 1.5rem;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0.75rem 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.section-title:nth-of-type(1) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-title:nth-of-type(1)::before {
    background: #3b82f6;
}

.section-title:nth-of-type(2) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.section-title:nth-of-type(2)::before {
    background: #10b981;
}

.section-title:nth-of-type(3) {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(55, 65, 81, 0.1) 100%);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.section-title:nth-of-type(3)::before {
    background: #6b7280;
}

.category-item {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.category-item:hover {
    background: var(--bg-color);
}

/* 玩家相关分类样式 */
.player-category.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-color: #3b82f6;
    color: #3b82f6;
    font-weight: 500;
}

.player-category.active .category-count {
    background: #3b82f6;
    color: white;
}

/* 代理相关分类样式 */
.agent-category.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: #10b981;
    color: #10b981;
    font-weight: 500;
}

.agent-category.active .category-count {
    background: #10b981;
    color: white;
}

/* 其他分类样式 */
.other-category.active {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(55, 65, 81, 0.1) 100%);
    border-color: #6b7280;
    color: #6b7280;
    font-weight: 500;
}

.other-category.active .category-count {
    background: #6b7280;
    color: white;
}

.category-name {
    font-size: 0.95rem;
}

.category-count {
    font-size: 0.8rem;
    background: var(--bg-color);
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    color: var(--text-secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: var(--card-bg);
    border: none;
    padding: 0.75rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 90;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.content-area {
    flex: 1;
    min-width: 0;
}

.breadcrumb {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumb-item {
    cursor: pointer;
    transition: var(--transition);
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.question-card:hover {
    box-shadow: var(--shadow-md);
}

.question-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.question-title {
    flex: 1;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.question-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    color: white;
}

.player-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.agent-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.expand-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.question-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.question-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.question-card.expanded .question-content {
    max-height: 2000px;
}

.answer-wrapper {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.answer-text {
    padding: 1.25rem 0;
    color: var(--text-primary);
    line-height: 1.8;
    white-space: pre-wrap;
}

.answer-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.copy-btn.copied {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.25rem;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 80;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        max-height: none;
        z-index: 90;
        border-radius: 0;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .close-sidebar {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .question-header {
        padding: 1rem 1.25rem;
    }

    .question-title {
        font-size: 1rem;
    }

    .answer-wrapper {
        padding: 0 1.25rem 1.25rem;
    }

    .main-content {
        gap: 1rem;
    }

    .menu-toggle {
        bottom: 1rem;
        left: 1rem;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.float-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: var(--transition);
    z-index: 85;
}

.float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.float-btn:active {
    transform: translateY(0);
}

.float-btn-icon {
    font-size: 1.25rem;
}

/* 自定义弹窗样式 */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #e6e9ef 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 
        8px 8px 16px rgba(174, 174, 192, 0.4),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    transform: translateY(-20px);
}

.custom-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-message {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.8);
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        5px 5px 10px rgba(174, 174, 192, 0.4),
        -2px -2px 5px rgba(255, 255, 255, 0.8);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        8px 8px 16px rgba(174, 174, 192, 0.5),
        -4px -4px 8px rgba(255, 255, 255, 0.9),
        0 4px 12px rgba(99, 102, 241, 0.3);
}

.modal-btn:active {
    transform: translateY(0);
    box-shadow: 
        3px 3px 6px rgba(174, 174, 192, 0.4),
        -1px -1px 3px rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
    .float-btn {
        right: 1rem;
        bottom: 5rem;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        max-width: 90%;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}
