.pcb-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px 20px;
    margin-bottom: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #8892b0;
    font-size: 1.1rem;
}

.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed #64ffda;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: rgba(100, 255, 218, 0.1);
    border-color: #64ffda;
    transform: translateY(-2px);
}

.upload-area.dragover {
    background: rgba(100, 255, 218, 0.15);
    border-color: #64ffda;
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.3);
}

.upload-icon {
    color: #64ffda;
    margin-bottom: 20px;
}

.upload-text h3 {
    color: #fff;
    margin-bottom: 8px;
}

.upload-text p {
    color: #8892b0;
}

.supported-formats {
    margin-top: 20px;
}

.format-badge {
    display: inline-block;
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
    padding: 6px 16px;
    border-radius: 20px;
    margin: 0 4px;
    font-size: 0.9rem;
}

.upload-progress {
    margin-top: 30px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #64ffda, #00bcd4);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #8892b0;
    margin-top: 10px;
}

.result-section {
    animation: fadeIn 0.5s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.result-header h2 {
    color: #64ffda;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    background: rgba(100, 255, 218, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: #fff;
    margin: 0;
}

.card-body {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: #8892b0;
}

.info-row .value {
    color: #fff;
    font-weight: 500;
}

.board-visual {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.board-shape {
    width: 100px;
    height: 70px;
    background: linear-gradient(135deg, #2d5a27, #1a472a);
    border: 2px solid #64ffda;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.layer-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 15px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.layer-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.drill-stats, .component-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #64ffda;
}

.stat-label {
    color: #8892b0;
    font-size: 0.9rem;
}

.hole-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hole-badge {
    background: rgba(100, 255, 218, 0.2);
    color: #64ffda;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.image-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #8892b0;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: #64ffda;
    color: #64ffda;
}

.image-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #64ffda, #00bcd4);
    color: #1a1a2e;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.history-info h4 {
    color: #fff;
    margin-bottom: 5px;
}

.history-info p {
    color: #8892b0;
    font-size: 0.9rem;
}

.history-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-failed {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.status-processing {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(100, 255, 218, 0.9);
    color: #1a1a2e;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.format-badge {
    cursor: pointer;
    transition: all 0.2s;
}

.format-badge:hover {
    transform: scale(1.05);
}

.format-full {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.format-partial {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.format-loading, .format-error {
    background: rgba(255, 255, 255, 0.1);
    color: #8892b0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.modal-header {
    background: rgba(100, 255, 218, 0.1);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: #8892b0;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #64ffda;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.format-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.format-vendor {
    color: #8892b0;
    font-size: 0.95rem;
}

.format-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-full {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-partial {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.status-upload {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.status-unsupported {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.format-description {
    color: #ccd6f6;
    line-height: 1.6;
    margin-bottom: 20px;
}

.format-extensions h4, .format-api-endpoints h4 {
    color: #64ffda;
    font-size: 1rem;
    margin-bottom: 12px;
}

.extension-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.extension-badge {
    background: rgba(100, 255, 218, 0.15);
    color: #64ffda;
    padding: 6px 14px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
}

.format-api-endpoints {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.api-endpoint {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.api-endpoint:last-child {
    margin-bottom: 0;
}

.api-method-path {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.api-method {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.api-method-post {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.api-method-get {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.api-path {
    color: #ccd6f6;
    font-family: monospace;
    font-size: 0.95rem;
}

.api-description {
    color: #8892b0;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.api-params {
    color: #8892b0;
    font-size: 0.85rem;
    margin: 4px 0;
}
