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

:root {
    --primary-gold: #f5a623;
    --secondary-orange: #ff6b35;
    --warm-beige: #f4e8d8;
    --dark-brown: #3d2817;
    --light-cream: #fef9f3;
    --accent-blue: #4a90e2;
    --text-dark: #2c2c2c;
    --text-light: #666;
}

html {
    -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    -webkit-touch-callout: none;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: url('bg.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    touch-action: pan-y;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(254, 249, 243, 0.85);
    backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 0;
}

.header {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.98) 0%, rgba(255, 107, 53, 0.98) 100%);
    color: white;
    padding: 25px 0;
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.4);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(15px);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.header:hover {
    box-shadow: 0 6px 25px rgba(245, 166, 35, 0.5);
    transform: translateY(-1px);
}

.header:active {
    transform: translateY(0);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, white, transparent);
    opacity: 0.3;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
    animation: fadeInDown 0.6s ease;
}

.logo {
    font-size: 2.2em;
    margin: 0;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: fadeInDown 0.6s ease;
}

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

.tagline {
    font-size: 1em;
    letter-spacing: 1px;
    opacity: 0.95;
    font-weight: 300;
}

.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(245, 166, 35, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.nav-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.98), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (max-width: 768px) {
    .nav-container::after {
        opacity: 1;
    }
}

.nav-menu {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-gold) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.nav-menu::-webkit-scrollbar {
    height: 6px;
}

.nav-menu::-webkit-scrollbar-track {
    background: rgba(245, 166, 35, 0.1);
    border-radius: 3px;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 3px;
}

.nav-item {
    padding: 12px 24px;
    background: linear-gradient(135deg, #fff 0%, #fef9f3 100%);
    border: 2px solid rgba(245, 166, 35, 0.2);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    flex-shrink: 0;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(245, 166, 35, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-item:hover::before {
    width: 300px;
    height: 300px;
}

.nav-item:hover {
    border-color: var(--primary-gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.3);
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border-color: var(--primary-gold);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
    font-weight: 600;
}

.submenu-container {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(245, 166, 35, 0.2);
    display: none;
    backdrop-filter: blur(15px);
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 99;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.submenu-container.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.submenu {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 20px 18px 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}

.submenu-item {
    padding: 10px 20px;
    background: white;
    border: 2px solid rgba(245, 166, 35, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
    color: var(--text-dark);
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.submenu-item:hover {
    border-color: var(--primary-gold);
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.2);
}

.submenu-item.active {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border-color: var(--primary-gold);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

.tool-menu-container {
    background: rgba(254, 249, 243, 0.98);
    border-bottom: 1px solid rgba(245, 166, 35, 0.15);
    display: none;
    backdrop-filter: blur(15px);
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 70vh;
    overflow-y: auto;
    margin-top: 0;
}

.tool-menu-container.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.tool-menu {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.tool-item {
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(245, 166, 35, 0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tool-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 166, 35, 0.1), transparent);
    transition: left 0.5s;
}

.tool-item:hover::before {
    left: 100%;
}

.tool-item:hover {
    border-color: var(--primary-gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.3);
    background: rgba(255, 255, 255, 0.98);
}

.tool-icon {
    font-size: 1.8em;
    flex-shrink: 0;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.tool-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.tool-name {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-dark);
}

.tool-desc {
    font-size: 0.8em;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-item.active {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    border-color: var(--primary-gold);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
}

.tool-item.active .tool-name,
.tool-item.active .tool-desc {
    color: white;
}

.main-content {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.welcome-screen {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 2px solid rgba(245, 166, 35, 0.3);
    backdrop-filter: blur(15px);
}

.welcome-content h2 {
    font-size: 2.5em;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-weight: 700;
}

.welcome-content > p {
    color: var(--text-light);
    font-size: 1.1em;
    margin-bottom: 50px;
}

.hot-topics-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    border: 2px solid rgba(245, 166, 35, 0.2);
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.3em;
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.more-link {
    color: var(--primary-gold);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 3px;
}

.more-link:hover {
    color: var(--secondary-orange);
    transform: translateX(3px);
}

.refresh-btn {
    background: rgba(245, 166, 35, 0.1);
    border: 2px solid rgba(245, 166, 35, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    color: var(--primary-gold);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: var(--primary-gold);
    color: white;
    border-color: var(--primary-gold);
    transform: rotate(180deg);
}

.hot-topics-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.hot-topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: white;
    border: 1px solid rgba(245, 166, 35, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.hot-topic-item:hover {
    border-color: var(--primary-gold);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.2);
}

.topic-rank {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-light);
    min-width: 30px;
    text-align: center;
}

.topic-rank.top1 {
    color: #ff4757;
}

.topic-rank.top2 {
    color: #ff6348;
}

.topic-rank.top3 {
    color: #ffa502;
}

.topic-content {
    flex: 1;
    min-width: 0;
}

.topic-title {
    font-size: 0.95em;
    color: var(--text-dark);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.topic-meta {
    font-size: 0.8em;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-hot {
    color: var(--secondary-orange);
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1em;
}

.error-message {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
}

.error-message button {
    margin-top: 15px;
    padding: 8px 20px;
    background: var(--primary-gold);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.error-message button:hover {
    background: var(--secondary-orange);
    transform: translateY(-2px);
}

.command-search-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    border: 2px solid rgba(245, 166, 35, 0.2);
    backdrop-filter: blur(10px);
}

.command-count {
    font-size: 0.9em;
    color: var(--text-light);
    font-weight: 500;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid rgba(245, 166, 35, 0.3);
    border-radius: 25px;
    font-size: 0.95em;
    outline: none;
    transition: all 0.3s;
    background: white;
}

.search-input:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.1);
}

.search-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
}

.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 18px;
    background: white;
    border: 2px solid rgba(245, 166, 35, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s;
    color: var(--text-dark);
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-gold);
    background: rgba(245, 166, 35, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border-color: var(--primary-gold);
}

.command-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.command-item {
    background: white;
    border: 2px solid rgba(245, 166, 35, 0.2);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s;
    cursor: pointer;
}

.command-item:hover {
    border-color: var(--primary-gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.2);
}

.command-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(245, 166, 35, 0.1);
    color: var(--primary-gold);
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-bottom: 10px;
}

.command-title {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.command-code {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: var(--secondary-orange);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed rgba(245, 166, 35, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.command-code:hover {
    background: rgba(245, 166, 35, 0.1);
    border-color: var(--primary-gold);
    transform: translateX(3px);
}

.command-code:active {
    transform: scale(0.98);
}

.command-code span:first-child {
    flex: 1;
    word-break: break-all;
}

.copy-icon {
    margin-left: 10px;
    font-size: 1.1em;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.command-code:hover .copy-icon {
    opacity: 1;
}

.command-code.copied {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #4caf50;
}

.copy-btn {
    background: var(--primary-gold);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: var(--secondary-orange);
}

.copy-btn.copied {
    background: #4caf50;
}

.command-desc {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 8px;
}

.command-expire {
    font-size: 0.8em;
    color: #999;
}

.command-expire.expired {
    color: #ff4757;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.feature-card {
    padding: 35px 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    transition: all 0.4s;
    border: 2px solid rgba(245, 166, 35, 0.2);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(245, 166, 35, 0.3);
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.98);
}

.feature-icon {
    font-size: 3.5em;
    display: block;
    margin-bottom: 20px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.3em;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9em;
    line-height: 1.6;
}

.iframe-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    height: calc(100vh - 280px);
    display: flex;
    flex-direction: column;
    border: 2px solid rgba(245, 166, 35, 0.2);
}

.iframe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.1) 0%, rgba(255, 107, 53, 0.1) 100%);
    border-bottom: 2px solid rgba(245, 166, 35, 0.2);
}

.iframe-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-tool-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1em;
}

.open-link {
    color: var(--primary-gold);
    text-decoration: none;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.open-link:hover {
    color: var(--secondary-orange);
    transform: translateX(3px);
}

.close-btn {
    background: rgba(245, 166, 35, 0.1);
    border: 2px solid rgba(245, 166, 35, 0.3);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    color: var(--text-dark);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border-color: var(--primary-gold);
    transform: rotate(90deg);
}

#tool-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: white;
}

.iframe-error {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.error-content {
    text-align: center;
    padding: 50px;
    max-width: 500px;
}

.error-icon {
    font-size: 4.5em;
    margin-bottom: 25px;
    opacity: 0.7;
}

.error-content h3 {
    color: var(--text-dark);
    font-size: 1.6em;
    margin-bottom: 18px;
    font-weight: 600;
}

.error-message {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.error-tool-name {
    font-weight: 600;
    color: var(--primary-gold);
}

.btn-primary {
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.5);
}

.open-message {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    animation: slideInDown 0.4s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.message-content {
    background: white;
    padding: 18px 35px;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95em;
    color: var(--text-dark);
    border: 2px solid rgba(245, 166, 35, 0.3);
}

.message-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.9em;
    font-weight: bold;
}

.message-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.9em;
    font-weight: bold;
}

.miniprogram-guide {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.guide-content {
    text-align: center;
    padding: 50px;
    max-width: 500px;
}

.guide-icon {
    font-size: 5em;
    margin-bottom: 25px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.guide-content h3 {
    color: var(--text-dark);
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.guide-desc {
    color: var(--text-light);
    margin-bottom: 35px;
    font-size: 1.05em;
}

.guide-steps {
    background: rgba(245, 166, 35, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    border: 2px solid rgba(245, 166, 35, 0.2);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(245, 166, 35, 0.1);
}

.step-item:last-child {
    border-bottom: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--secondary-orange) 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95em;
    flex-shrink: 0;
}

.step-text {
    color: var(--text-dark);
    font-size: 1.05em;
    font-weight: 500;
    text-align: left;
}

.guide-tip {
    background: rgba(74, 144, 226, 0.1);
    color: var(--accent-blue);
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 0.95em;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
        background-attachment: scroll;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .logo-container {
        gap: 10px;
        margin-bottom: 6px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .logo {
        font-size: 1.5em;
        letter-spacing: 1px;
    }
    
    .tagline {
        font-size: 0.9em;
    }
    
    .navbar {
        position: sticky;
        top: 0;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-menu {
        gap: 8px;
        padding: 12px 5px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        scroll-padding: 0 10px;
    }
    
    .nav-menu::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        padding: 11px 20px;
        font-size: 0.9em;
        scroll-snap-align: center;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
        flex-shrink: 0;
        min-width: fit-content;
        border-radius: 22px;
    }
    
    .nav-item:active {
        transform: scale(0.95);
    }
    
    .nav-item:first-child {
        margin-left: 5px;
    }
    
    .nav-item:last-child {
        margin-right: 5px;
    }
    
    .submenu-container {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        z-index: 99;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .submenu {
        padding: 15px 10px;
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    
    .submenu-item {
        padding: 8px 16px;
        font-size: 0.85em;
        white-space: nowrap;
        scroll-snap-align: start;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .submenu-item:active {
        transform: scale(0.95);
    }
    
    .tool-menu-container {
        position: relative;
        left: 0;
        right: 0;
        top: 0;
        z-index: 1;
        max-height: 60vh;
    }
    
    .tool-menu {
        padding: 15px 10px;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tool-item {
        padding: 12px 15px;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .tool-item:active {
        transform: scale(0.98);
    }
    
    .tool-icon {
        font-size: 1.5em;
    }
    
    .tool-name {
        font-size: 0.9em;
    }
    
    .tool-desc {
        font-size: 0.75em;
    }
    
    .main-content {
        margin: 20px auto;
        padding: 0 10px;
    }
    
    .welcome-screen {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .welcome-content h2 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .welcome-content > p {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    
    .hot-topics-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .section-header h3 {
        font-size: 1.15em;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .more-link {
        font-size: 0.85em;
    }
    
    .refresh-btn {
        width: 32px;
        height: 32px;
        font-size: 1.2em;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .refresh-btn:active {
        transform: scale(0.9) rotate(180deg);
    }
    
    .hot-topics-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .hot-topic-item {
        padding: 10px 12px;
        gap: 10px;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .hot-topic-item:active {
        transform: scale(0.98);
    }
    
    .topic-rank {
        font-size: 1em;
        min-width: 26px;
    }
    
    .topic-title {
        font-size: 0.9em;
    }
    
    .topic-meta {
        font-size: 0.75em;
    }
    
    .command-search-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .search-box {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-input {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .search-btn {
        padding: 10px 24px;
        font-size: 0.9em;
        width: 100%;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .search-btn:active {
        transform: scale(0.98);
    }
    
    .category-filter {
        gap: 8px;
        margin-bottom: 15px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .filter-btn {
        padding: 7px 14px;
        font-size: 0.8em;
        white-space: nowrap;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .filter-btn:active {
        transform: scale(0.95);
    }
    
    .command-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .command-item {
        padding: 15px;
    }
    
    .command-category {
        font-size: 0.7em;
        padding: 3px 10px;
    }
    
    .command-title {
        font-size: 0.95em;
    }
    
    .command-code {
        padding: 8px 12px;
        font-size: 0.85em;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .command-code:active {
        transform: scale(0.98);
    }
    
    .copy-icon {
        font-size: 1em;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }
    
    .feature-card {
        padding: 25px 20px;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .feature-card:active {
        transform: scale(0.98);
    }
    
    .feature-icon {
        font-size: 2.8em;
        margin-bottom: 15px;
    }
    
    .feature-card h3 {
        font-size: 1.15em;
    }
    
    .feature-card p {
        font-size: 0.85em;
    }
    
    .iframe-container {
        height: calc(100vh - 150px);
        border-radius: 15px;
        margin: 0 -10px;
    }
    
    .iframe-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .iframe-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    
    .current-tool-name {
        font-size: 1em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .open-link {
        font-size: 0.85em;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .close-btn {
        width: 34px;
        height: 34px;
        font-size: 1.2em;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .close-btn:active {
        transform: scale(0.9);
    }
    
    .error-content {
        padding: 30px 20px;
    }
    
    .error-icon {
        font-size: 3.5em;
        margin-bottom: 20px;
    }
    
    .error-content h3 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    
    .error-message {
        font-size: 0.9em;
        margin-bottom: 25px;
    }
    
    .btn-primary {
        padding: 12px 28px;
        font-size: 0.95em;
        -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
    }
    
    .btn-primary:active {
        transform: scale(0.98);
    }
    
    .guide-content {
        padding: 30px 20px;
    }
    
    .guide-icon {
        font-size: 4em;
        margin-bottom: 20px;
    }
    
    .guide-content h3 {
        font-size: 1.5em;
        margin-bottom: 12px;
    }
    
    .guide-desc {
        font-size: 0.95em;
        margin-bottom: 25px;
    }
    
    .guide-steps {
        padding: 20px 15px;
    }
    
    .step-item {
        padding: 12px 0;
        gap: 12px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
    }
    
    .step-text {
        font-size: 0.95em;
    }
    
    .guide-tip {
        padding: 12px 15px;
        font-size: 0.85em;
    }
    
    .open-message {
        top: 100px;
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .message-content {
        padding: 14px 20px;
        font-size: 0.9em;
        gap: 10px;
    }
    
    .message-icon {
        width: 24px;
        height: 24px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3em;
    }
    
    .tagline {
        font-size: 0.85em;
    }
    
    .nav-item {
        padding: 10px 18px;
        font-size: 0.85em;
    }
    
    .welcome-content h2 {
        font-size: 1.5em;
    }
    
    .section-header h3 {
        font-size: 1.05em;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 2.5em;
    }
    
    .hot-topic-item {
        padding: 8px 10px;
    }
    
    .topic-title {
        font-size: 0.85em;
    }
    
    .main-content {
        padding: 0 5px;
    }
    
    .welcome-screen {
        padding: 25px 15px;
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 10px 0;
    }
    
    .logo {
        font-size: 1.3em;
    }
    
    .tagline {
        display: none;
    }
    
    .welcome-screen {
        padding: 20px 15px;
    }
    
    .iframe-container {
        height: calc(100vh - 100px);
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .logo {
        font-size: 1.2em;
    }
    
    .nav-item {
        padding: 9px 16px;
        font-size: 0.8em;
    }
    
    .submenu-item {
        padding: 7px 14px;
        font-size: 0.8em;
    }
    
    .hot-topics-section,
    .command-search-section {
        padding: 15px 10px;
    }
}
