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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    background-color: #0a0e1a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.nav-bar {
    background-color: #0e1424;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

/* 导航栏时钟样式（暂时注释）
.nav-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 1rem;
    background: rgba(14, 20, 36, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
    font-family: 'Courier New', monospace;
    margin-left: auto;
}

.nav-clock-time {
    font-size: 1.35rem;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.nav-clock-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
    margin-top: 0.15rem;
}

body.light-theme .nav-clock {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(59, 130, 246, 0.2);
}

body.light-theme .nav-clock-time {
    color: #2563eb;
    text-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

body.light-theme .nav-clock-date {
    color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 1024px) {
    .nav-clock {
        display: none;
    }
}
*/

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: white;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f9fafb;
    letter-spacing: -0.01em;
}

#home .ad-carousel {
    width: 100%;
    background-color: #0e1424;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    margin-bottom: 1rem;
}

.carousel-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 300px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #3b82f6;
    transform: scale(1.2);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(59, 130, 246, 0.8);
}

.carousel-btn.prev-btn {
    left: 20px;
}

.carousel-btn.next-btn {
    right: 20px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    background: transparent;
    color: #9ca3af;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.main-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 1rem 2rem;
    width: 100%;
    min-height: calc(100vh - 70px);
}

.section {
    background-color: #0e1424;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.section-content {
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: #f9fafb;
    font-size: 1.25rem;
    font-weight: 600;
}

.upload-btn {
    background-color: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
}

.upload-btn:hover {
    background-color: #2563eb;
}

.jlc-mode-btn {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border: 2px solid rgba(59, 130, 246, 0.5);
    position: relative;
}

.jlc-mode-btn::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.jlc-mode-btn:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-color: rgba(59, 130, 246, 0.8);
}

.jlc-mode-btn.active {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-color: rgba(16, 185, 129, 0.5);
}

.jlc-mode-btn.active:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    border-color: rgba(16, 185, 129, 0.8);
}

.pcb-grid.jlc-mode {
    background-color: #f3f4f6;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    border-color: rgba(59, 130, 246, 0.3);
}

.pcb-grid.jlc-mode .grid-label {
    color: #1e40af;
}

.pcb-grid.jlc-mode .pcb-ruler {
    background-color: #e5e7eb;
    color: #374151;
}

.pcb-grid.jlc-mode .pcb-axis {
    background-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.jlc-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    z-index: 100;
}

.pcb-grid.jlc-mode .grid-overlay,
.pcb-grid.jlc-mode .grid-label,
.pcb-grid.jlc-mode .pcb-image-container,
.pcb-grid.jlc-mode .pcb-ruler,
.pcb-grid.jlc-mode .pcb-axis,
.pcb-grid.jlc-mode .drawing-toolbar {
    display: none !important;
}

.pcb-grid.jlc-mode .jlc-iframe {
    display: block !important;
}

#analysis.jlc-mode .content-grid {
    grid-template-columns: 1fr;
}

#analysis.jlc-mode .side-panel {
    display: none !important;
}

#analysis.jlc-mode .pcb-grid {
    min-height: 750px;
    max-height: calc(100vh - 400px);
}

.jlc-analysis-panel {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.jlc-analysis-panel .analysis-bar,
.jlc-analysis-panel .features-bar {
    flex: 1;
    min-width: 300px;
    background: rgba(30, 64, 175, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.jlc-analysis-panel h3 {
    color: #1e40af;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.jlc-analysis-panel .model-radio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.jlc-analysis-panel .radio-item {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem;
}

.jlc-analysis-panel .feature-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.jlc-analysis-panel .checkbox-item {
    padding: 0.5rem 1rem;
}

.jlc-analysis-panel .action-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    width: 100%;
    height: 100%;
}

.main-area {
    position: relative;
    width: 100%;
}

.pcb-grid {
    width: 100%;
    min-height: 600px;
    max-height: calc(100vh - 250px);
    background-color: #111827;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    cursor: grab;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.pcb-grid:active {
    cursor: grabbing;
}

.pcb-grid.has-image {
    cursor: grab;
}

.pcb-grid.has-image:active {
    cursor: grabbing;
}

.pcb-image-container {
    position: absolute;
    top: 20px;
    left: 20px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
    z-index: 1;
}

.pcb-image-container img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 2;
}

.grid-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    pointer-events: none;
    z-index: 3;
}

.pcb-axis {
    position: absolute;
    background-color: rgba(59, 130, 246, 0.5);
    pointer-events: none;
    z-index: 4;
}

.axis-x {
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
}

.axis-y {
    width: 2px;
    height: 100%;
    top: 0;
    left: 0;
}

.pcb-ruler {
    position: absolute;
    background-color: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.1);
    pointer-events: none;
    z-index: 5;
    display: flex;
    align-items: center;
    font-size: 10px;
    font-family: monospace;
    color: #6b7280;
}

.ruler-x {
    width: 100%;
    height: 20px;
    top: 0;
    left: 0;
    flex-direction: row;
    padding-left: 20px;
}

.ruler-y {
    width: 20px;
    height: 100%;
    top: 0;
    left: 0;
    flex-direction: column;
    padding-top: 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.ruler-x::before,
.ruler-y::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        to right,
        transparent 0px,
        #3b82f6 1px,
        #3b82f6 2px,
        transparent 2px,
        transparent 10px
    );
    background-size: 10px 100%;
    opacity: 0.3;
}

.ruler-y::before {
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        #3b82f6 1px,
        #3b82f6 2px,
        transparent 2px,
        transparent 10px
    );
    background-size: 100% 10px;
}

.ruler-x::after {
    content: '0 10 20 30 40 50 60 70 80 90 100';
    position: absolute;
    top: 2px;
    left: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    padding-right: 10px;
    color: #6b7280;
}

.ruler-y::after {
    content: '0 10 20 30 40 50';
    position: absolute;
    top: 20px;
    left: 2px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 10px;
    color: #6b7280;
}

.axis-x::after {
    content: 'X轴 (mm)';
    position: absolute;
    right: 10px;
    bottom: 2px;
    font-size: 11px;
    font-weight: 500;
    color: #3b82f6;
}

.axis-y::after {
    content: 'Y轴 (mm)';
    position: absolute;
    top: 10px;
    left: 5px;
    font-size: 11px;
    font-weight: 500;
    color: #3b82f6;
    transform: rotate(-90deg);
    transform-origin: left top;
}

.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.drawing-toolbar {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.drawing-tool-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    background-color: #0e1424;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.drawing-tool-btn:hover {
    background-color: #1f2937;
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.drawing-tool-btn:active {
    transform: scale(0.95);
}

.drawing-tool-btn.active {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

.drawing-tool-btn.active:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.drawing-tool-btn[data-tool="lock"].active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.drawing-tool-btn[data-tool="lock"].active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    background-color: #0e1424;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background-color: #1f2937;
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pcb-grid.locked {
    border-color: rgba(239, 68, 68, 0.3);
}

.pcb-grid.locked .pcb-image-container {
    pointer-events: none;
}

.zoom-reset {
    font-size: 10px;
    padding: 0 4px;
}

.side-panel {
    background-color: #111827;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
    width: 100%;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.side-panel h3 {
    color: #f9fafb;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.side-panel h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background-color: #3b82f6;
    border-radius: 2px;
}

.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
    color: #9ca3af;
    font-size: 0.9rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-checkbox-list {
    margin-bottom: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #0e1424;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: #d1d5db;
    transition: all 0.15s ease;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 0.625rem;
    accent-color: #3b82f6;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.checkbox-item:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.model-selection {
    margin-bottom: 1.5rem;
}

.model-selection h4 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.side-panel h4 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.model-radio-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background-color: #0e1424;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    cursor: pointer;
    font-size: 0.875rem;
    color: #d1d5db;
    transition: all 0.15s ease;
}

.model-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    object-fit: contain;
    flex-shrink: 0;
}

.radio-item input[type="radio"] {
    margin-right: 0.625rem;
    accent-color: #3b82f6;
    cursor: pointer;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.radio-item:hover:not(.disabled) {
    border-color: rgba(59, 130, 246, 0.3);
    background-color: rgba(59, 130, 246, 0.05);
}

.radio-item input[type="radio"]:checked + .radio-label {
    color: #60a5fa;
    font-weight: 500;
}

.radio-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #0a0f1c;
    border-color: rgba(107, 114, 128, 0.2);
}

.radio-item.disabled .model-icon {
    filter: grayscale(100%);
}

.radio-item.disabled .radio-label {
    color: #6b7280;
}

.radio-item.disabled input[type="radio"] {
    cursor: not-allowed;
}

.radio-label {
    flex: 1;
    cursor: pointer;
}

.radio-item:not(.disabled) .radio-label {
    cursor: pointer;
}

.analysis-result {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(14, 20, 36, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(10px);
}

.analysis-result h4 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-result h4::before {
    content: '📊';
    font-size: 1.1rem;
}

.result-content {
    background-color: rgba(14, 20, 36, 0.8);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #d1d5db;
    max-height: 300px;
    overflow-y: auto;
}

.result-content p {
    margin-bottom: 0.5rem;
}

.result-content .result-item {
    margin-bottom: 0.875rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.result-content .result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-content .result-title {
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.375rem;
    font-size: 0.9rem;
}

.ai-analysis-content {
    line-height: 1.8;
    color: #d1d5db;
}

.ai-analysis-content br {
    display: block;
    margin: 0.5rem 0;
}

.generated-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generated-image-item {
    text-align: center;
    background-color: #0e1424;
    border-radius: 8px;
    padding: 0.875rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.generated-image-item h5 {
    color: #f9fafb;
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.generated-image-item img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.generated-image-item p {
    margin-top: 0.625rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.action-btn {
    width: 100%;
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-bottom: 12px;
}

.action-btn.secondary:hover {
    background-color: #334155;
    color: #e2e8f0;
}

.action-btn.locked {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
}

.interactive-controls {
    margin: 1.25rem 0;
    padding: 1rem;
    background-color: #0e1424;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.interactive-controls h4 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.control-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.control-btn {
    background-color: #0e1424;
    color: #9ca3af;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.5rem 0.375rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.control-btn:hover {
    background-color: #1f2937;
    color: #60a5fa;
}

.control-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
}

.isolation-area {
    position: absolute;
    border: 2px solid rgba(239, 68, 68, 0.7);
    background-color: rgba(239, 68, 68, 0.1);
    z-index: 5;
    border-radius: 4px;
}

.layout-changes {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.layout-changes h5 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.change-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #0e1424;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.change-item h6 {
    color: #60a5fa;
    margin-bottom: 0.25rem;
    font-size: 0.825rem;
    font-weight: 600;
}

.change-item p {
    font-size: 0.825rem;
    color: #9ca3af;
    line-height: 1.5;
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.hero-section h1 {
    color: #f9fafb;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.hero-section p {
    color: #9ca3af;
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background-color: #111827;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.feature-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.feature-card h3 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.feature-card p {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.6;
}

.bom-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bom-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.login-panel {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    width: 480px;
    max-width: 90vw;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input {
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    color: #1f2937;
    background-color: #f9fafb;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #3b82f6;
}

.login-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    font-size: 0.875rem;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.forgot-password {
    color: #3b82f6;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #2563eb;
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.login-footer p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.register-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.register-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* 灵艺原理图样式 */
.schematic-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.schematic-style-selector {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background-color: #0e1424;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.schematic-style-selector h4 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.style-options {
    display: flex;
    gap: 1.5rem;
}

.style-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #d1d5db;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.style-option:hover {
    color: #60a5fa;
}

.style-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.style-option input[type="radio"]:checked + span {
    color: #3b82f6;
    font-weight: 500;
}

.schematic-input .input-area {
    background-color: #111827;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.schematic-input h3 {
    color: #f9fafb;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.schematic-input textarea {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    background-color: #0e1424;
    color: #e5e7eb;
    text-align: left;
}

.schematic-input .input-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
}

.schematic-input textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.schematic-actions {
    display: flex;
    justify-content: center;
}

.schematic-result {
    background-color: #111827;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.schematic-result h3 {
    color: #f9fafb;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.result-area {
    flex: 1;
    background-color: #0e1424;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 1.5rem;
}

.result-placeholder {
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 原理图结果样式 */
.schematic-output {
    width: 100%;
    height: 100%;
    overflow: auto;
}

.schematic-output pre {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e5e7eb;
}

.bom-input textarea {
    width: 100%;
    height: 200px;
    padding: 0.875rem;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    background-color: #0e1424;
    color: #e5e7eb;
}

.bom-input textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.bom-actions {
    display: flex;
    justify-content: center;
}

.bom-result h3 {
    color: #f9fafb;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.result-table {
    overflow-x: auto;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.result-table table {
    width: 100%;
    border-collapse: collapse;
}

.result-table th,
.result-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.result-table th {
    background-color: #0e1424;
    font-weight: 600;
    color: #60a5fa;
    font-size: 0.9rem;
}

.result-table tr:hover {
    background-color: rgba(59, 130, 246, 0.03);
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .nav-container,
    .main-container {
        padding: 0 1.25rem;
    }
    
    .section {
        padding: 1.25rem;
    }
    
    .pcb-grid {
        min-height: 500px;
        max-height: calc(100vh - 300px);
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 0.375rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .main-container {
        padding: 0.75rem;
        min-height: calc(100vh - 70px);
    }
    
    .section {
        padding: 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
    }
    
    .pcb-grid {
        min-height: 400px;
        max-height: calc(100vh - 350px);
    }
    
    .hero-container {
        padding: 1.5rem;
        gap: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .main-container {
        padding: 0.5rem;
    }
    
    .section {
        padding: 0.75rem;
    }
    
    .pcb-grid {
        min-height: 350px;
        max-height: calc(100vh - 300px);
    }
    
    .hero-container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .feature-item {
        padding: 0.75rem;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.pcb-grid.loading {
    animation: pulse 1.5s infinite;
}

.model-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.model-loading-content {
    background-color: #0e1424;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-text {
    color: #f9fafb;
    font-size: 1rem;
    margin: 0;
}

body.light-theme .model-loading-content {
    background-color: #ffffff;
    border-color: rgba(59, 130, 246, 0.2);
}

body.light-theme .loading-spinner {
    border-color: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
}

body.light-theme .loading-text {
    color: #374151;
}

.pcb-grid.has-image .grid-label {
    display: none;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0e1424;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* ============ 科幻风格主页样式 ============ */
.hero-container {
    position: relative;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 2rem 3rem;
    overflow: hidden;
}

/* 科幻圆环装饰 */
.sci-fi-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ring-outer {
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotateRing 40s linear infinite;
}

.ring-inner {
    width: 450px;
    height: 450px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotateRingReverse 30s linear infinite;
}

@keyframes rotateRing {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateRingReverse {
    from { transform: translate(-50%, -50%) rotate(360deg); }
    to { transform: translate(-50%, -50%) rotate(0deg); }
}

.ring-segment {
    position: absolute;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    opacity: 0.4;
}

.ring-outer .ring-segment.top {
    width: 150px;
    height: 4px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.ring-outer .ring-segment.right {
    width: 4px;
    height: 150px;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.ring-outer .ring-segment.bottom {
    width: 150px;
    height: 4px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.ring-outer .ring-segment.left {
    width: 4px;
    height: 150px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.ring-inner .ring-segment.top {
    width: 100px;
    height: 3px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.ring-inner .ring-segment.right {
    width: 3px;
    height: 100px;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.ring-inner .ring-segment.bottom {
    width: 100px;
    height: 3px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.ring-inner .ring-segment.left {
    width: 3px;
    height: 100px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* 扫描线效果 */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
    top: 0;
    left: 0;
    animation: scanLine 4s linear infinite;
    pointer-events: none;
}

@keyframes scanLine {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* 粒子效果 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.5;
    animation: floatParticle 8s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s; }
.particle:nth-child(3) { left: 40%; top: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 55%; top: 70%; animation-delay: 3s; }
.particle:nth-child(5) { left: 70%; top: 40%; animation-delay: 4s; }
.particle:nth-child(6) { left: 85%; top: 80%; animation-delay: 5s; }
.particle:nth-child(7) { left: 15%; top: 50%; animation-delay: 6s; }
.particle:nth-child(8) { left: 60%; top: 15%; animation-delay: 7s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    25% { transform: translateY(-30px) translateX(20px); opacity: 0.6; }
    50% { transform: translateY(-10px) translateX(-20px); opacity: 0.4; }
    75% { transform: translateY(-40px) translateX(10px); opacity: 0.7; }
}

/* 左侧标题区域 */
.hero-left {
    flex: 1;
    z-index: 10;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.label-decor {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, transparent);
}

.section-label span {
    font-size: 0.85rem;
    color: #9ca3af;
    letter-spacing: 3px;
    font-weight: 600;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #9ca3af;
    margin-bottom: 3rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.5);
    border-left: 2px solid #3b82f6;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.feature-item:hover {
    background: rgba(17, 24, 39, 0.8);
    transform: translateX(5px);
    border-left-color: #60a5fa;
}

.feature-icon {
    font-size: 1.2rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #e5e7eb;
}

.feature-item p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* 右侧展示区域 */
.hero-right {
    flex: 1;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-display {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.display-title {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.display-code {
    font-size: 3.5rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 0.1em;
}

.display-name {
    font-size: 1.2rem;
    color: #6b7280;
    letter-spacing: 0.2em;
}

.display-image {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.grid-pattern::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15), transparent 60%);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 移除旧的hero-section样式 */
.hero-section {
    display: none;
}

@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 2rem;
        gap: 2rem;
    }
    
    .ring-outer {
        width: 400px;
        height: 400px;
    }
    
    .ring-inner {
        width: 300px;
        height: 300px;
    }
    
    .hero-left, .hero-right {
        width: 100%;
    }
    
    .display-title {
        align-items: center;
    }
    
    .feature-item {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .ring-outer {
        width: 300px;
        height: 300px;
    }
    
    .ring-inner {
        width: 220px;
        height: 220px;
    }
    
    .display-image {
        height: 300px;
    }
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #9ca3af;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 灵犀原理图 - V2大气布局 */
.lingxi-container-v2 {
    display: flex;
    height: calc(100vh - 180px);
    min-height: 750px;
    background: linear-gradient(135deg, #0a0f1f 0%, #1a1645 50%, #0a0f1f 100%);
    border-radius: 16px;
    overflow: hidden;
    gap: 0;
}

/* 左边栏 */
.lingxi-left-panel {
    width: 220px;
    background: rgba(10, 15, 31, 0.95);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.lingxi-left-panel .panel-section {
    margin-bottom: 18px;
}

.lingxi-left-panel .panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lingxi-left-panel .panel-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.upload-area {
    margin-bottom: 8px;
}

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.upload-icon-box {
    font-size: 2rem;
    margin-bottom: 10px;
}

.upload-text {
    color: #e0e7ff;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 3px 0;
}

.upload-hint {
    color: #64748b;
    font-size: 0.75rem;
}

.file-list {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
}

.file-list::-webkit-scrollbar {
    width: 5px;
}

.file-list::-webkit-scrollbar-track {
    background: rgba(59, 130, 246, 0.05);
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.25);
    border-radius: 3px;
}

.empty-state {
    text-align: center;
    color: #475569;
    font-size: 0.85rem;
    padding: 24px 16px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.file-item.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

.file-item-icon {
    font-size: 1.1rem;
}

.file-item-name {
    flex: 1;
    color: #cbd5e1;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item-delete {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    color: #f87171;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-item-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* 中间主区域 */
.lingxi-center-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(10, 15, 31, 0.7);
}

.center-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 15, 31, 0.9);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.center-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #60a5fa;
    margin: 0;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #e0e7ff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-action-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.header-action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
}

.header-action-btn.primary:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.canvas-container {
    flex: 1;
    padding: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcb-canvas {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(30, 64, 175, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
                #050810;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.canvas-placeholder {
    text-align: center;
    color: #475569;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.pcb-canvas img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.canvas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(10, 15, 31, 0.9);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
}

.zoom-label {
    color: #94a3b8;
    font-size: 0.85rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.toolbar-center {
    display: flex;
    gap: 8px;
}

.tool-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.status-text {
    color: #64748b;
    font-size: 0.85rem;
}

/* 右边栏 */
.lingxi-right-panel {
    width: 340px;
    background: rgba(10, 15, 31, 0.95);
    border-left: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    flex-direction: column;
}

.right-tabs {
    display: flex;
    background: rgba(10, 15, 31, 0.8);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.right-tab {
    flex: 1;
    padding: 14px 12px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.right-tab:hover {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.05);
}

.right-tab.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
    border-bottom-color: #3b82f6;
}

.right-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: none;
}

.right-tab-content.active {
    display: block;
}

.right-tab-content::-webkit-scrollbar {
    width: 5px;
}

.right-tab-content::-webkit-scrollbar-track {
    background: rgba(59, 130, 246, 0.05);
}

.right-tab-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.25);
    border-radius: 3px;
}

.right-tab-content .panel-section {
    margin-bottom: 20px;
}

.right-tab-content .panel-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.quick-commands-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-command {
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    color: #93c5fd;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.quick-command:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.issue-container {
    min-height: 100px;
}

.empty-issue {
    text-align: center;
    color: #475569;
    font-size: 0.85rem;
    padding: 24px 16px;
}

.issue-card {
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
}

.issue-card.warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.issue-card.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.issue-card.success .issue-title {
    color: #10b981;
}

.issue-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.issue-icon {
    font-size: 1rem;
}

.issue-title {
    color: #f97316;
    font-weight: 600;
    font-size: 0.85rem;
    flex: 1;
}

.issue-card.error .issue-title {
    color: #ef4444;
}

.issue-desc {
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.5;
}

.suggestion-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    padding: 14px;
    min-height: 120px;
    margin-bottom: 12px;
}

.empty-text {
    color: #475569;
    font-size: 0.85rem;
    text-align: center;
    padding: 20px 0;
}

.apply-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.style-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.style-option-card {
    display: flex;
    cursor: pointer;
}

.style-option-card input {
    display: none;
}

.option-card-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.style-option-card:hover .option-card-content {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.style-option-card input:checked + .option-card-content {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

.card-icon {
    font-size: 1.4rem;
}

.card-title {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
}

.advanced-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.advanced-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.advanced-option-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.advanced-option-item input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.advanced-option-item input:checked ~ .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.advanced-option-item input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
}

.option-label {
    flex: 1;
    color: #cbd5e1;
    font-size: 0.85rem;
}

.result-container {
    min-height: 350px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    padding: 20px;
}

.result-placeholder {
    text-align: center;
    color: #475569;
    padding: 60px 20px;
}

.result-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.bottom-input-area {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: rgba(10, 15, 31, 0.9);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.bottom-input-area textarea {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    color: #e0e7ff;
    font-size: 0.9rem;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    font-family: inherit;
}

.bottom-input-area textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.8);
}

.send-button {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-button:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

/* 灵犀原理图 - 深色科技风格 */
.lingxi-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 700px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.lingxi-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

.lingxi-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.lingxi-actions {
    display: flex;
    gap: 12px;
}

.lingxi-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #e0e7ff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lingxi-action-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.lingxi-action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
}

.lingxi-action-btn.primary:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.lingxi-action-btn.full-width {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    font-size: 1rem;
}

.lingxi-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.lingxi-pcb-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.5);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
}

.pcb-canvas-container {
    flex: 1;
    padding: 20px;
    overflow: hidden;
}

.lingxi-pcb-panel .pcb-grid {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, rgba(30, 64, 175, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
                #0a0f1f;
}

.lingxi-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 20px;
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.zoom-label {
    font-size: 0.85rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.lingxi-right-panel {
    width: 360px;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.9);
}

.lingxi-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.lingxi-tab {
    flex: 1;
    padding: 12px 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.lingxi-tab:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.05);
}

.lingxi-tab.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
    border-bottom-color: #3b82f6;
}

.lingxi-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.lingxi-tab-content.active {
    display: block;
}

.lingxi-tab-content::-webkit-scrollbar {
    width: 6px;
}

.lingxi-tab-content::-webkit-scrollbar-track {
    background: rgba(59, 130, 246, 0.05);
}

.lingxi-tab-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.25);
    border-radius: 3px;
}

.panel-section {
    margin-bottom: 20px;
}

.panel-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e7ff;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.quick-commands {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-command-btn {
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 6px;
    color: #93c5fd;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-command-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.issue-list {
    min-height: 80px;
}

.issue-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
}

.issue-item.warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.issue-item.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.issue-type {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.issue-content {
    flex: 1;
}

.issue-title {
    color: #f97316;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.issue-item.error .issue-title {
    color: #ef4444;
}

.issue-desc {
    color: #94a3b8;
    font-size: 0.8rem;
}

.no-issue {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    padding: 20px;
}

.suggestion-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    padding: 12px;
    min-height: 100px;
    margin-bottom: 12px;
}

.empty-hint {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}

.style-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.style-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-option:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.style-option:has(input:checked) {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

.option-icon {
    font-size: 1.1rem;
}

.advanced-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.advanced-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.advanced-option:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.advanced-option:has(input:checked) {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.check-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    color: #10b981;
    font-size: 0.85rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.advanced-option:has(input:checked) .check-icon {
    opacity: 1;
}

.result-display {
    min-height: 300px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    padding: 16px;
}

.lingxi-input-area {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.lingxi-input-area textarea {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    color: #e0e7ff;
    font-size: 0.85rem;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    font-family: inherit;
}

.lingxi-input-area textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.8);
}

.lingxi-input-area .send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lingxi-input-area .send-btn:hover {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.lingxi-style-selector h4,
.lingxi-options h4 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.lingxi-options .checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lingxi-options .checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #d1d5db;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    padding: 0.5rem;
    border-radius: 6px;
}

.lingxi-options .checkbox-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.lingxi-options .checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.theme-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.login-nav-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.login-nav-btn svg {
    stroke: currentColor;
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

/* 白天主题 */
body.light-theme {
    background-color: #f5f5f5;
    color: #1f2937;
}

body.light-theme .nav-bar {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light-theme .section {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-theme .pcb-grid {
    background-color: #f9fafb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light-theme .side-panel {
    background-color: #f9fafb;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

body.light-theme .checkbox-item {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #374151;
}

body.light-theme .checkbox-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background-color: #f8fafc;
}

body.light-theme .model-selection h4 {
    color: #1f2937;
}

body.light-theme .side-panel h4 {
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

body.light-theme .radio-item {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #374151;
}

body.light-theme .radio-item:hover:not(.disabled) {
    border-color: rgba(59, 130, 246, 0.4);
    background-color: #f8fafc;
}

body.light-theme .radio-item input[type="radio"]:checked + .radio-label {
    color: #2563eb;
    font-weight: 500;
}

body.light-theme .radio-item.disabled {
    background-color: #f1f5f9;
    border-color: rgba(107, 114, 128, 0.3);
}

body.light-theme .radio-item.disabled .radio-label {
    color: #9ca3af;
}

body.light-theme .feature-card {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #374151;
}

body.light-theme .feature-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

body.light-theme .feature-card h3 {
    color: #1f2937;
}

body.light-theme .feature-card p {
    color: #4b5563;
}

body.light-theme .upload-btn {
    background-color: #3b82f6;
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

body.light-theme .upload-btn:hover {
    background-color: #2563eb;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

body.light-theme .action-btn {
    background-color: #3b82f6;
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

body.light-theme .action-btn:hover {
    background-color: #2563eb;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

body.light-theme .nav-link {
    color: #374151;
    font-weight: 500;
}

body.light-theme .nav-link:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    font-weight: 600;
}

body.light-theme .nav-link.active {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 主题切换按钮样式 */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.theme-toggle:hover::before {
    opacity: 1;
}

.theme-toggle:active {
    transform: scale(1.05) rotate(15deg);
}

.theme-icon {
    font-size: 1.4rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(360deg);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1.5fr 1fr;
    }
    
    .nav-container,
    .main-container {
        padding: 0 1.25rem;
    }
    
    .section {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        gap: 0.375rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .main-container {
        padding: 1rem;
        min-height: calc(100vh - 70px);
    }
    
    .section {
        padding: 1.25rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .pcb-grid {
        height: 500px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .main-container {
        padding: 0.75rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-card h3 {
        font-size: 1rem;
    }
    
    .feature-card p {
        font-size: 0.85rem;
    }
}




body.light-theme .side-panel h3 {
    color: #1f2937;
}

body.light-theme .feature-list li {
    color: #4b5563;
}

body.light-theme .result-content {
    background-color: #f9fafb;
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #374151;
}

body.light-theme .generated-image-item {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

body.light-theme .generated-image-item h5 {
    color: #1f2937;
}

body.light-theme .generated-image-item p {
    color: #4b5563;
}

body.light-theme .zoom-btn {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #374151;
}

body.light-theme .zoom-btn:hover {
    background-color: #f8fafc;
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.4);
}

body.light-theme .drawing-tool-btn {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #374151;
}

body.light-theme .drawing-tool-btn:hover {
    background-color: #f8fafc;
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.4);
}

body.light-theme .drawing-tool-btn.active {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

body.light-theme .drawing-tool-btn.active:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

body.light-theme .drawing-tool-btn[data-tool="lock"].active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

body.light-theme .drawing-tool-btn[data-tool="lock"].active:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

body.light-theme .grid-label {
    color: #6b7280;
    font-weight: 500;
}

body.light-theme .pcb-ruler {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #4b5563;
}

body.light-theme .bom-input textarea {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: #1f2937;
}

body.light-theme .bom-input textarea:focus {
    border-color: #3b82f6;
}

/* 灵艺原理图白天主题样式 */
body.light-theme .schematic-input .input-area {
    background-color: #f8fafc;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

body.light-theme .schematic-input h3 {
    color: #1f2937;
}

body.light-theme .schematic-input textarea {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: #1f2937;
}

body.light-theme .schematic-input textarea:focus {
    border-color: #3b82f6;
}

body.light-theme .schematic-result {
    background-color: #f8fafc;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

body.light-theme .schematic-result h3 {
    color: #1f2937;
}

body.light-theme .result-area {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

body.light-theme .result-placeholder {
    color: #64748b;
}

/* 灵艺原理图白天主题样式 - 新增部分 */
body.light-theme .schematic-input .input-hint {
    color: #64748b;
}

body.light-theme .schematic-output pre {
    color: #1f2937;
}

body.light-theme .result-area {
    background-color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

body.light-theme .result-placeholder {
    color: #64748b;
}

body.light-theme .result-table th {
    background-color: #f1f5f9;
    color: #2563eb;
    font-weight: 600;
}

body.light-theme .result-table td {
    color: #374151;
}

body.light-theme .result-table tr:hover {
    background-color: rgba(59, 130, 246, 0.08);
}

body.light-theme .theme-toggle {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

body.light-theme .theme-toggle:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

body.light-theme .login-nav-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

body.light-theme .login-nav-btn:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* 登录弹窗样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.login-modal-content {
    position: relative;
    z-index: 1;
    animation: modalFadeIn 0.3s ease;
}

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

.login-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
    z-index: 2;
}

.login-modal-close:hover {
    color: #3b82f6;
}

/* 白天主题下的额外可见性增强 */
body.light-theme .pcb-grid {
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.light-theme .section {
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light-theme .side-panel {
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* 白天主题下的主页样式 */
body.light-theme #home .ad-carousel {
    background-color: #f8fafc;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

body.light-theme .hero-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

body.light-theme .hero-left {
    background: transparent;
}

body.light-theme .hero-right {
    background: transparent;
}

body.light-theme .hero-title {
    background: linear-gradient(135deg, #1f2937 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .hero-subtitle {
    color: #64748b;
}

/* 右侧悬浮侧边栏 */
.side-toolbar {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1a1f2e 0%, #0e1424 100%);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 8px;
    cursor: grab;
    user-select: none;
}

.side-toolbar:active {
    cursor: grabbing;
}

.side-toolbar.dragging {
    transition: none;
}

.toolbar-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
}

.side-toolbar:hover .toolbar-close {
    opacity: 1;
    visibility: visible;
}

.toolbar-close:hover {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    transform: scale(1.1);
}

.toolbar-close svg {
    stroke-width: 2.5;
}

.toolbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 4px;
    min-width: 60px;
}

.toolbar-item:last-child {
    margin-bottom: 0;
}

.toolbar-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.3) 100%);
}

.toolbar-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.toolbar-item:hover .toolbar-icon {
    color: #3b82f6;
    transform: scale(1.1);
}

.toolbar-icon svg {
    stroke: currentColor;
}

.toolbar-text {
    font-size: 0.7rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.toolbar-item:hover .toolbar-text {
    color: #e2e8f0;
}

/* AI助理特殊样式 */
.toolbar-item.ai-assistant {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
}

.toolbar-item.ai-assistant:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(147, 51, 234, 0.3) 100%);
}

.toolbar-icon.ai-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #9333ea 100%);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

/* 侧边栏弹窗样式 */
.side-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.side-modal-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #1a1f2e 0%, #0e1424 100%);
    border-radius: 16px;
    width: 400px;
    max-width: 90vw;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: sideModalFadeIn 0.3s ease;
}

@keyframes sideModalFadeIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.side-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.side-modal-header h3 {
    color: #f9fafb;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.side-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.side-modal-close:hover {
    color: #f9fafb;
    background: rgba(59, 130, 246, 0.2);
}

.side-modal-body {
    padding: 1.5rem;
}

.side-modal-body textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1rem;
    color: #e2e8f0;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 1rem;
}

.side-modal-body textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.side-modal-body textarea::placeholder {
    color: #64748b;
}

.side-modal-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.side-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 关注我们样式 */
.follow-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.follow-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.follow-icon {
    font-size: 1.25rem;
}

/* 客服咨询样式 */
.service-info {
    margin-bottom: 1.5rem;
}

.service-info p {
    color: #e2e8f0;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
}

/* AI助理聊天样式 */
.ai-modal .side-modal-content {
    width: 450px;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.ai-chat-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ai-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.ai-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-message.ai-bot {
    align-items: flex-start;
}

.ai-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #9333ea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ai-bubble {
    background: rgba(59, 130, 246, 0.15);
    padding: 0.875rem 1rem;
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 80%;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-input-area {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
}

.ai-input-area input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.ai-input-area input:focus {
    outline: none;
    border-color: #3b82f6;
}

.ai-input-area input::placeholder {
    color: #64748b;
}

.ai-input-area button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-input-area button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 白天主题下的侧边栏样式 */
body.light-theme .side-toolbar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .toolbar-item {
    border-bottom-color: rgba(59, 130, 246, 0.1);
}

body.light-theme .toolbar-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.15) 100%);
}

body.light-theme .toolbar-icon {
    color: #3b82f6;
}

body.light-theme .toolbar-item:hover .toolbar-icon {
    color: #2563eb;
}

body.light-theme .toolbar-text {
    color: #64748b;
}

body.light-theme .toolbar-item:hover .toolbar-text {
    color: #1f2937;
}

body.light-theme .toolbar-item.ai-assistant {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
}

body.light-theme .toolbar-close {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .toolbar-close:hover {
    background: rgba(239, 68, 68, 0.8);
    color: white;
}

body.light-theme .side-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

body.light-theme .side-modal-header h3 {
    color: #1f2937;
}

body.light-theme .side-modal-close {
    color: #64748b;
}

body.light-theme .side-modal-close:hover {
    color: #1f2937;
    background: rgba(59, 130, 246, 0.1);
}

body.light-theme .side-modal-body textarea {
    background: #f1f5f9;
    border-color: rgba(59, 130, 246, 0.2);
    color: #1f2937;
}

body.light-theme .side-modal-body textarea::placeholder {
    color: #94a3b8;
}

body.light-theme .follow-item {
    background: #f1f5f9;
    color: #374151;
}

body.light-theme .follow-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

body.light-theme .service-info p {
    color: #374151;
    background: #f1f5f9;
}

body.light-theme .ai-bubble {
    background: rgba(59, 130, 246, 0.1);
    color: #374151;
    border-color: rgba(59, 130, 246, 0.2);
}

body.light-theme .ai-input-area input {
    background: #f1f5f9;
    border-color: rgba(59, 130, 246, 0.2);
    color: #1f2937;
}

body.light-theme .ai-input-area input::placeholder {
    color: #94a3b8;
}

/* AI助理侧边栏样式 */
.ai-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 90vh;
    max-height: 800px;
    margin: auto 20px auto 0;
    z-index: 10002;
    display: flex;
    justify-content: flex-end;
}

.ai-sidebar-overlay {
    display: none;
}

.ai-sidebar-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    animation: aiSidebarSlideIn 0.3s ease;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
}

@keyframes aiSidebarSlideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.ai-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.ai-header-left h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.ai-header-actions {
    display: flex;
    gap: 0.5rem;
}

.ai-header-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ai-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ai-header-btn.ai-close:hover {
    background: rgba(239, 68, 68, 0.8);
}

.ai-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.ai-welcome {
    text-align: center;
    margin-bottom: 2rem;
}

.ai-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ai-title-gradient {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-title-highlight {
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

.ai-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.ai-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-suggestion-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateX(-4px);
}

.ai-suggestion-item svg {
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.ai-suggestion-item:hover svg {
    color: #3b82f6;
    transform: translateX(4px);
}

.ai-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.ai-agents {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ai-agent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-agent.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(147, 51, 234, 0.3) 100%);
    color: #fff;
}

.ai-agent:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ai-agent-icon {
    font-size: 1rem;
}

.ai-input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.ai-input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    margin-bottom: 0.75rem;
}

.ai-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ai-input-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-model-select {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-model-select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ai-model-icon {
    font-size: 0.9rem;
}

.ai-input-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ai-input-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.ai-send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: all 0.2s ease;
}

.ai-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.ai-disclaimer {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    margin: 0;
}

/* AI消息样式 */
.ai-messages {
    display: none;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    max-height: 100%;
    padding: 0 1rem;
}

/* 白天主题下的AI侧边栏 */
body.light-theme .ai-sidebar-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

body.light-theme .ai-sidebar-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .ai-header-left h3 {
    color: #1f2937;
}

body.light-theme .ai-header-btn {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .ai-header-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1f2937;
}

body.light-theme .ai-title-gradient {
    background: linear-gradient(90deg, #d97706 0%, #dc2626 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-theme .ai-title-highlight {
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-theme .ai-subtitle {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .ai-suggestion-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .ai-suggestion-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

body.light-theme .ai-suggestion-item svg {
    color: rgba(0, 0, 0, 0.3);
}

body.light-theme .ai-sidebar-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .ai-agent {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .ai-agent.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
    color: #1f2937;
}

body.light-theme .ai-input-wrapper {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .ai-input-wrapper input {
    color: #1f2937;
}

body.light-theme .ai-input-wrapper input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .ai-model-select {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .ai-input-btn {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .ai-input-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .ai-disclaimer {
    color: rgba(0, 0, 0, 0.4);
}

/* AI打字机动画 */
.typing-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

body.light-theme .feature-item {
    background: rgba(255, 255, 255, 0.9);
    border-left: 2px solid #2563eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-theme .feature-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(5px);
    border-left-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .feature-icon {
    color: #2563eb;
}

body.light-theme .feature-item h3 {
    color: #1f2937;
}

body.light-theme .feature-item p {
    color: #64748b;
}

body.light-theme .sci-fi-ring {
    opacity: 0.3;
}

body.light-theme .ring-segment {
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
}

body.light-theme .scan-line {
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
}

body.light-theme .particle {
    background: #2563eb;
}

body.light-theme .display-code {
    color: #1f2937;
}

body.light-theme .display-name {
    color: #64748b;
}

body.light-theme .display-image {
    background-image: 
        linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

body.light-theme .grid-pattern::before {
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.1), transparent 60%);
}

body.light-theme .nav-bar {
    border-bottom: 1px solid rgba(59, 130, 246, 0.25);
}

body.light-theme .brand-logo {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

body.light-theme input[type="checkbox"] {
    accent-color: #2563eb;
}

body.light-theme .result-title {
    color: #2563eb;
}

body.light-theme .ai-analysis-content {
    color: #374151;
}

body.light-theme .change-item {
    border-left: 3px solid #2563eb;
    background-color: #f8fafc;
}

body.light-theme .change-item h6 {
    color: #2563eb;
}

body.light-theme .change-item p {
    color: #4b5563;
}

body.light-theme .interactive-controls {
    border: 1px solid rgba(59, 130, 246, 0.2);
    background-color: #f8fafc;
}

body.light-theme .interactive-controls h4 {
    color: #1f2937;
}

body.light-theme .control-btn {
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #374151;
}

body.light-theme .control-btn:hover {
    background-color: #f1f5f9;
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.4);
}

body.light-theme .control-btn.active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* ============================================
   移动端响应式优化
   ============================================ */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .brand-name {
        font-size: 1rem;
    }
}

/* 手机设备 (小于 768px) */
@media (max-width: 768px) {
    .nav-bar {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-wrapper {
        gap: 1rem;
    }
    
    .brand-name {
        display: none; /* 隐藏品牌名称，只保留Logo */
    }
    
    .nav-links {
        gap: 0.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
        flex-wrap: nowrap;
        max-width: calc(100vw - 80px);
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .login-nav-btn {
        padding: 0.375rem;
    }
    
    .login-nav-btn span {
        display: none; /* 隐藏登录文字，只保留图标 */
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
    }
    
    /* 侧边栏适配 */
    .side-toolbar {
        right: 8px;
        padding: 6px;
    }
    
    .toolbar-item {
        padding: 8px 6px;
    }
    
    .toolbar-icon {
        width: 20px;
        height: 20px;
    }
    
    .toolbar-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .toolbar-text {
        font-size: 0.65rem;
    }
    
    /* AI侧边栏适配 */
    .ai-sidebar-content {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    /* 弹窗适配 */
    .side-modal-content {
        width: 95vw;
        max-width: 350px;
    }
    
    /* 首页英雄区域 */
    .hero-section {
        padding: 1.5rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    /* 功能卡片 */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* 智能分析模块 */
    .model-selection {
        flex-direction: column;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    /* 登录弹窗 */
    .login-modal-content {
        width: 95vw;
        padding: 1.5rem;
    }
}

/* 小屏手机 (小于 480px) */
@media (max-width: 480px) {
    .nav-bar {
        padding: 0.375rem 0;
    }
    
    .brand-logo {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .nav-link {
        padding: 0.25rem 0.375rem;
        font-size: 0.7rem;
    }
    
    /* 隐藏部分导航项，只保留核心功能 */
    .nav-links .nav-link[data-target="schematic"],
    .nav-links .nav-link[data-target="bom"] {
        display: none;
    }
    
    /* 轮播广告适配 */
    .carousel-container {
        height: 150px;
    }
    
    .carousel-slide img {
        object-fit: cover;
    }
    
    /* 模块标题 */
    .section h2 {
        font-size: 1.25rem;
    }
    
    /* PCB网格区域 */
    .pcb-grid {
        min-height: 300px;
    }
    
    /* 按钮组 */
    .feature-checkbox-list {
        grid-template-columns: 1fr;
    }
    
    .checkbox-item {
        font-size: 0.85rem;
    }
    
    /* 分析结果区域 */
    .analysis-result {
        font-size: 0.85rem;
    }
    
    /* 灵艺原理图结果 */
    .schematic-result pre {
        font-size: 0.7rem;
    }
    
    /* BOM表格 */
    .bom-table {
        font-size: 0.8rem;
    }
    
    .bom-table th,
    .bom-table td {
        padding: 0.5rem 0.375rem;
    }
}

/* 超小屏设备 (小于 360px) */
@media (max-width: 360px) {
    .nav-link {
        padding: 0.25rem 0.25rem;
        font-size: 0.65rem;
    }
    
    /* 进一步简化导航 */
    .nav-links .nav-link[data-target="layout"] {
        display: none;
    }
}
