
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-body: #f3f6fc;
    --bg-surface: rgba(255, 255, 255, 0.96);
    --bg-nav: rgba(255, 255, 255, 0.92);
    --text-primary: #0f2b3d;
    --text-secondary: #334155;
    --text-muted: #4a627a;
    --border-light: rgba(148, 163, 184, 0.3);
    --card-bg: #ffffff;
    --card-highlight: #eef2ff;
    --hover-bg: rgba(59, 130, 246, 0.08);
    --link-color: #2563eb;
    --tree-bg: #ffffff;
    --tree-hover: #f1f5f9;
    --footer-bg: rgba(255, 255, 255, 0.85);
    --badge-bg: #eef2ff;
    --badge-text: #2563eb;
    --hero-overlay: linear-gradient(135deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 100%);
}

/* 服务页面样式 */
.service-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6b6b6b 0%, #808080 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    flex-shrink: 0;
}

.service-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.service-profile-id {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.service-field {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: 0.5rem;
}

.service-field:last-child {
    border-bottom: none;
}

.service-field-label {
    width: 80px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.service-field-value {
    flex: 1;
    color: var(--text-primary);
}

.service-btn {
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    background: var(--hover-bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-family: inherit;
}

.service-btn:hover {
    background: rgba(59, 130, 246, 0.2);
}

.service-btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 40px;
    font-weight: 550;
    padding: 0.6rem 2rem;
    font-size: 0.9rem;
}

.service-btn-primary:hover {
    background: #2563eb;
}

.service-btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.service-btn-success:hover {
    background: #218838;
}

.service-btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.service-btn-danger:hover {
    background: #c82333;
}

.service-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 0.8rem;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.service-input:focus {
    border-color: #3b82f6;
}

.service-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.service-msg {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0.5rem;
    display: none;
}

.service-msg.show {
    display: block;
}

.service-msg.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.service-msg.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.service-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.service-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.service-form-group {
    margin-bottom: 0.8rem;
}

.service-form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    .service-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .service-avatar {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .service-field {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .service-field-label {
        width: 100%;
    }
    
    .service-field-value {
        width: 100%;
    }
    
    .service-input {
        width: 100%;
    }
    
    .service-btn {
        width: 100%;
        margin-top: 0.3rem;
    }
}

.user-menu-container {
    position: relative;
    margin-left: 15px;
}

.user-icon-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    color: white;
}

.user-icon-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--bg-surface, white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 160px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    border: 1px solid var(--border-color, #e5e7eb);
}

.user-dropdown.show {
    display: block;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary, #333);
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-hover, #f3f4f6);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color, #e5e7eb);
    margin: 4px 0;
}

[data-theme="dark"] .user-dropdown {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .dropdown-item {
    color: #e5e7eb;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #374151;
}

[data-theme="dark"] .dropdown-divider {
    background: #374151;
}

.user-login-status {
    font-size: 12px;
    color: #10b981;
    margin-left: 5px;
}

.user-name-display {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
html[data-theme="dark"] {
    --bg-body: #0a0c12;
    --bg-surface: rgba(22, 26, 35, 0.96);
    --bg-nav: rgba(18, 22, 30, 0.92);
    --text-primary: #eef2ff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-light: rgba(71, 85, 105, 0.5);
    --card-bg: #1e293b;
    --card-highlight: #2d3a4e;
    --hover-bg: rgba(59, 130, 246, 0.2);
    --link-color: #60a5fa;
    --tree-bg: #1e293b;
    --tree-hover: #2d3a4e;
    --footer-bg: rgba(18, 22, 30, 0.85);
    --badge-bg: #2d3a4e;
    --badge-text: #90cdf4;
    --hero-overlay: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.2s ease, color 0.2s ease;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent; 
}

.modern-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.nav-brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #1e4a76, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    background: var(--hover-bg);
    padding: 0.3rem;
    border-radius: 60px;
    backdrop-filter: blur(4px);
}

.nav-link {
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 550;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-link:active {
    transform: scale(0.96);
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.12);
    color: var(--link-color);
}

.nav-link.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.theme-toggle {
    background: var(--hover-bg);
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    backdrop-filter: blur(4px);
    color: var(--text-secondary);
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:active {
    transform: scale(0.92);
}

.theme-toggle:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.hero-section {
    border-radius: 2rem;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
    background-image: url('pic.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.2);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-overlay);
    backdrop-filter: brightness(0.92);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.hero-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.3));
    background: rgba(255,255,255,0.5);
    border-radius: 30px;
    padding: 10px;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-sub {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.page-container {
    background: var(--bg-surface);
    border-radius: 2rem;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.08);
    padding: 2rem 2rem;
    transition: background 0.2s;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(125deg, #0f2b3d, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    border-left: 5px solid #3b82f6;
    padding-left: 1rem;
}


.tree-view {
    margin: 1.5rem 0;
    background: var(--tree-bg);
    border-radius: 1.2rem;
    padding: 0.8rem;
    border: 1px solid var(--border-light);
}

.tree-node {
    margin-left: 0;
    list-style: none;
    user-select: none;
}

.tree-node .tree-node {
    margin-left: 1.8rem;
}

.tree-node-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 550;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
}

.tree-node-header:active {
    transform: scale(0.98);
}

.tree-node-header:hover {
    background: var(--tree-hover);
}

.tree-toggle {
    font-size: 0.8rem;
    width: 1.5rem;
    display: inline-block;
    color: var(--text-muted);
}

.tree-icon {
    font-size: 1.2rem;
    width: 1.8rem;
}

.tree-name {
    flex: 1;
    font-weight: 500;
}

.tree-leaf-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem 0.6rem 2rem;
    border-radius: 0.8rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tree-leaf-item:active {
    transform: scale(0.98);
}

.tree-leaf-item:hover {
    background: var(--tree-hover);
    transform: translateX(4px);
}

.tree-leaf-item a {
    text-decoration: none;
    color: inherit;
    display: contents;
}

.tree-path {
    font-size: 0.7rem;
    background: var(--badge-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    color: var(--badge-text);
    font-family: monospace;
}

.tree-arrow {
    color: var(--text-muted);
    font-size: 1rem;
}

.disabled-item {
    opacity: 0.6;
    cursor: default;
    filter: grayscale(0.1);
}

.disabled-item:hover {
    transform: none;
    background: transparent;
}

.coming-item {
    cursor: pointer;
}

.coming-name, .disabled-name {
    color: var(--text-muted);
}

.tree-badge {
    font-size: 0.65rem;
    background: var(--badge-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    color: var(--badge-text);
}

.update-card {
    background: var(--card-bg);
    border-radius: 1.2rem;
    padding: 1.2rem 1.5rem;
    border-left: 4px solid #3b82f6;
    transition: all 0.2s;
    color: var(--text-secondary);
    -webkit-tap-highlight-color: transparent;
}

.update-card:active {
    transform: scale(0.98);
}

.update-date {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 600;
}

.update-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge-count {
    background: var(--badge-bg);
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-weight: 500;
    color: var(--badge-text);
}

.site-footer {
    background: var(--bg-body);
    border-top: 1px solid var(--border-light);
    padding: 2rem 2rem 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-col p:first-child {
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-col .qr-code {
    width: 80px;
    height: 80px;
    margin-top: 0.3rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.contact-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: color 0.2s;
    width: fit-content;
}

.contact-link:hover {
    color: var(--link-color);
}

.ad-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.ad-card {
  background: var(--bg-surface);
  border-radius: 2rem;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: adSlideUp 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  border: 1px solid var(--border-light);
}

.ad-header {
  background: linear-gradient(135deg, #2563eb20, #1e4a7620);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ad-icon {
  font-size: 1.8rem;
}

.ad-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.ad-body {
  padding: 1.5rem;
}

.ad-from {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.ad-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.ad-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.ad-actions {
  display: flex;
  gap: 0.8rem;
  padding: 0.2rem 1.5rem 1.5rem 1.5rem;
  justify-content: flex-end;
}

.ad-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: var(--hover-bg);
  color: var(--text-secondary);
}

.ad-btn-primary {
  background: #3b82f6;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.ad-btn-primary:hover {
  background: #2563eb;
  transform: scale(1.02);
}

.ad-btn-secondary:hover {
  background: var(--card-highlight);
  transform: scale(1.02);
}

hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 1.5rem auto 1rem;
    max-width: 1280px;
}

.copyright {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 1280px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .ad-overlay {
        align-items: flex-end;
        padding-bottom: 0;
    }
    
    .ad-card {
        width: 100%;
        max-width: 100%;
        border-radius: 1.5rem 1.5rem 0 0;
        animation: adSlideUpMobile 0.3s ease-out;
    }
    
    @keyframes adSlideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
@keyframes adSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.6rem 1rem;
        gap: 0.8rem;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .nav-logo-area {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }
    
    .nav-logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .nav-brand-text {
        font-size: 1rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        padding: 0.4rem;
        gap: 0.5rem;
        display: flex;
        flex-wrap: nowrap;
        order: 3;
    }
    
    .nav-link {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
        flex: 0 0 auto;
        text-align: center;
        white-space: nowrap;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .hero-section {
        min-height: 300px;
        border-radius: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.8rem;
        border-radius: 20px;
        padding: 8px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-sub {
        font-size: 0.9rem;
    }
    
    .page-container {
        padding: 1.2rem;
        border-radius: 1.2rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        padding-left: 0.8rem;
    }
    
    .tree-view {
        padding: 0.5rem;
        margin: 1rem 0;
    }
    
    .tree-node .tree-node {
        margin-left: 1rem;
    }
    
    .tree-node-header {
        padding: 0.5rem 0.6rem;
        gap: 0.4rem;
    }
    
    .tree-toggle {
        font-size: 0.7rem;
        width: 1.2rem;
    }
    
    .tree-icon {
        font-size: 1rem;
        width: 1.5rem;
    }
    
    .tree-name {
        font-size: 0.9rem;
    }
    
    .tree-leaf-item {
        padding: 0.5rem 0.6rem 0.5rem 1.5rem;
        gap: 0.4rem;
    }
    
    .tree-path {
        display: none;
    }
    
    .tree-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.5rem;
    }
    
    .update-card {
        padding: 1rem;
        margin-bottom: 0.8rem;
    }
    
    .update-title {
        font-size: 1rem;
    }
    
    .update-date {
        font-size: 0.7rem;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 0.8rem;
    }
    
    .site-footer {
        padding: 1.5rem 1rem 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.2rem;
    }
    
    .footer-col .qr-code {
        margin: 0.3rem auto 0;
    }
    
    .contact-row {
        align-items: center;
    }
    
    .contact-link {
        justify-content: center;
    }
    
    .nav-link,
    .theme-toggle,
    .tree-node-header,
    .tree-leaf-item,
    .contact-link,
    .update-card {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .nav-link {
        min-height: 38px;
    }
    
    .theme-toggle {
        min-height: 36px;
    }
    
    .tree-node-header,
    .tree-leaf-item {
        min-height: 44px;
    }
    
    .contact-link {
        min-height: 32px;
    }
    
    .tree-view {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tree-node {
        min-width: max-content;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem 0.8rem;
    }
    
    .nav-brand-text {
        font-size: 0.95rem;
    }
    
    .nav-logo-icon {
        width: 24px;
        height: 24px;
    }
    
    .nav-link {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .hero-section {
        min-height: 250px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-sub {
        font-size: 0.8rem;
    }
    
    .hero-logo {
        width: 50px;
        height: 50px;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .page-container {
        padding: 0.8rem;
    }
    
    .tree-node-header {
        padding: 0.4rem 0.5rem;
    }
    
    .tree-leaf-item {
        padding: 0.4rem 0.5rem 0.4rem 1.2rem;
    }
    
    .tree-icon {
        font-size: 0.9rem;
        width: 1.3rem;
    }
    
    .tree-name {
        font-size: 0.85rem;
    }

    .ad-card {
        width: 92%;
        border-radius: 1.5rem;
    }
    .ad-header {
        padding: 0.8rem 1.2rem;
    }
    .ad-header h3 {
        font-size: 1.1rem;
    }
    .ad-icon {
        font-size: 1.5rem;
    }
    .ad-body {
        padding: 1.2rem;
    }
    .ad-title {
        font-size: 1.2rem;
    }
    .ad-text {
        font-size: 0.9rem;
    }
    .ad-actions {
        padding: 0.2rem 1.2rem 1.2rem 1.2rem;
    }
    .ad-btn {
        padding: 0.45rem 1rem;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 200px;
    }
    
    .hero-logo {
        width: 45px;
        height: 45px;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .nav-links {
        width: auto;
    }
    
    .main-content {
        padding: 0.8rem;
    }
}