/* 3D Print Slicer - Styles */

* {
    box-sizing: border-box;
}

.print-slicer-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
}

/* Header - Simple Modern Design */
.slicer-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0;
}

.slicer-header h2 {
    margin: 0 0 8px;
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.5px;
}

.slicer-header p {
    margin: 0;
    font-size: 1.125rem;
    color: #6b7280;
    font-weight: 400;
}

/* Layout */
.slicer-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Viewer Panel - Clean Card Design */
.slicer-viewer-panel {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s;
}

.slicer-viewer-panel:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

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

.viewer-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #111827;
    font-weight: 600;
}

.viewer-controls {
    display: flex;
    gap: 8px;
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
}

#slicer-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 250, 251, 0.95);
    pointer-events: none;
    transition: opacity 0.3s;
}

.canvas-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-message {
    text-align: center;
}

.overlay-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.overlay-message p {
    margin: 0;
    font-size: 1.125rem;
    color: #6b7280;
}

.viewer-info {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.813rem;
    color: #6b7280;
    font-weight: 600;
}

.info-value {
    font-size: 1.063rem;
    color: #374151;
    font-weight: 700;
}

/* Control Panel - Modern Minimal */
.slicer-control-panel {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: box-shadow 0.2s;
}

.slicer-control-panel:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.control-section {
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.control-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.control-section h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    color: #111827;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* File Upload */
.file-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-name {
    padding: 10px 14px;
    background: #f9fafb;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
}

.file-name.active {
    background: #e5e7eb;
    border-color: #374151;
    color: #111827;
}

/* Settings */
.setting-group {
    margin-bottom: 16px;
}

.setting-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.938rem;
    font-weight: 600;
    color: #374151;
}

.setting-hint {
    font-size: 0.813rem;
    font-weight: 400;
    color: #9ca3af;
}

/* Transform Controls */
.transform-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.transform-btn {
    padding: 10px 12px;
    font-size: 0.875rem;
}

.transform-btn.active {
    background: #374151;
    color: #ffffff;
    border-color: #374151;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #374151;
    cursor: pointer;
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #374151;
    cursor: pointer;
    border: none;
}

.slider-value {
    min-width: 40px;
    font-size: 0.938rem;
    font-weight: 700;
    color: #374151;
    text-align: right;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.938rem;
    color: #374151;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.slicer-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.938rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.slicer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slicer-btn-primary {
    background: #374151;
    color: #fff;
}

.slicer-btn-primary:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.slicer-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
    padding: 8px 16px;
    font-size: 0.875rem;
}

.slicer-btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.slicer-btn-success {
    background: #374151;
    color: #fff;
}

.slicer-btn-success:hover:not(:disabled) {
    background: #1f2937;
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
}

.slicer-btn-warning {
    background: #374151;
    color: #fff;
}

.slicer-btn-warning:hover:not(:disabled) {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.slicer-btn-danger {
    background: #ef4444;
    color: #fff;
}

.slicer-btn-danger:hover:not(:disabled) {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Support Info */
.support-info {
    margin-top: 16px;
    padding: 12px;
    background: #fef3c7;
    border-left: 4px solid #374151;
    border-radius: 8px;
}

.support-info p {
    margin: 0 0 8px;
    font-size: 0.938rem;
    color: #78350f;
}

.support-info p:last-child {
    margin-bottom: 0;
}

/* Quote Result */
.quote-result {
    margin-top: 16px;
}

.result-card {
    background: #f3f4f6;
    border: 2px solid #374151;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

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

.result-item.highlight {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid #374151;
}

.result-label {
    font-size: 0.938rem;
    font-weight: 600;
    color: #451a03;
}

.result-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #9a3412;
}

.result-item.highlight .result-value {
    font-size: 1.5rem;
    color: #1f2937;
}

.result-details {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.result-details p {
    margin: 0 0 4px;
    color: #6b7280;
}

.result-details p:last-child {
    margin-bottom: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #374151;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin: 20px 0 0;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Help Section */
.slicer-help {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.slicer-help h3 {
    margin: 0 0 20px;
    font-size: 1.375rem;
    color: #1a1a1a;
}

.slicer-help ol {
    margin: 0;
    padding-left: 24px;
    line-height: 1.8;
}

.slicer-help ol li {
    margin-bottom: 12px;
    color: #374151;
}

.slicer-help ul {
    margin: 8px 0;
    padding-left: 24px;
}

.slicer-help ul li {
    margin-bottom: 4px;
}

.spec-info {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.spec-info h4 {
    margin: 0 0 12px;
    font-size: 1.063rem;
    color: #374151;
}

.spec-info ul {
    margin: 0;
    padding-left: 24px;
}

.spec-info ul li {
    margin-bottom: 6px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 1024px) {
    .slicer-layout {
        grid-template-columns: 1fr;
    }

    .slicer-control-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .print-slicer-container {
        margin: 20px auto;
    }

    .slicer-header {
        padding: 24px 20px;
    }

    .slicer-header h2 {
        font-size: 1.5rem;
    }

    .canvas-container {
        height: 400px;
    }

    .viewer-info {
        flex-direction: column;
        gap: 12px;
    }

    .slicer-help {
        padding: 24px 20px;
    }
}
