/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* SEO Landing Section Styles */
.seo-landing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.seo-container {
    max-width: 1200px;
    margin: 0 auto;
}

.seo-header h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.seo-header p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.features-section {
    margin-top: 30px;
}

.features-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: #ffd700;
}

.features-scroll-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    backdrop-filter: blur(10px);
}

.features-scroll-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.features-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 12px;
    max-width: 320px;
    backdrop-filter: blur(10px);
    min-width: 280px;
    height: 240px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.feature-card i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

.feature-card[data-feature="clt"] i { color: #ffd700; }
.feature-card[data-feature="thermal"] i { color: #ff6b6b; }
.feature-card[data-feature="design"] i { color: #4ecdc4; }
.feature-card[data-feature="failure"] i { color: #45b7d1; }
.feature-card[data-feature="microcrack"] i { color: #a8e6cf; }
.feature-card[data-feature="fracture"] i { color: #ff8a80; }

.feature-card[data-category="material-science"] i { color: #ffd700; }
.feature-card[data-category="structural"] i { color: #ff6b6b; }
.feature-card[data-category="quality"] i { color: #4ecdc4; }
.feature-card[data-category="environmental"] i { color: #45b7d1; }

.feature-card h4 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-card p {
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.feature-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-card li {
    padding: 3px 0;
    font-size: 0.85rem;
    opacity: 0.9;
    position: relative;
    padding-left: 15px;
    line-height: 1.3;
}

.feature-card li::before {
    content: "•";
    color: #ffd700;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.scroll-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.scroll-controls:first-of-type {
    left: 10px;
}

.scroll-controls:last-of-type {
    right: 10px;
}

.scroll-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .seo-header h2 {
        font-size: 1.8rem;
    }
    
    .seo-header p {
        font-size: 1rem;
    }
    
    .feature-card {
        min-width: 250px;
        height: 220px;
        padding: 20px;
    }
    
    .scroll-controls {
        display: none;
    }
    
    .features-scroll-wrapper {
        padding-bottom: 20px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.user-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.login-prompt {
    display: flex;
    gap: 10px;
}

/* Progress Indicator */
.progress-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 10;
    min-height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Loading animation for progress bar */
.progress-fill.loading {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    background-size: 200% 100%;
    animation: progressLoading 2s ease-in-out infinite;
}

@keyframes progressLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loading-indicator i {
    color: #3b82f6;
    font-size: 1rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    position: relative;
    padding: 20px 15px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.step.clickable {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 20px 15px;
}

.step.clickable:hover {
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #3b82f6;
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step.clickable:hover .step-number {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.step.clickable:hover .step-label {
    color: #1e40af;
    font-weight: 600;
}

.step.clickable:hover .step-indicator {
    color: #3b82f6;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .progress-steps {
        display: none;
    }

    .progress-container {
        gap: 10px;
    }
}

/* Lines between circles removed for cleaner look */

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    position: relative;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.step.active .step-number,
.step.current .step-number {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
}

.step-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    text-align: center;
    background: transparent;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.step.active .step-label,
.step.current .step-label {
    color: #1e40af;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(30, 64, 175, 0.1);
}

.step-indicator {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    margin-top: 8px;
    font-style: normal;
    background: transparent;
    font-weight: 500;
    letter-spacing: 0.025em;
    opacity: 0.8;
}

.step-indicator.current {
    color: #3b82f6;
    font-weight: 600;
    opacity: 1;
}

.step-indicator.completed {
    color: #059669;
    font-weight: 600;
    opacity: 1;
}

.step-indicator.pending {
    color: #64748b;
    font-weight: 500;
    opacity: 0.8;
}

.step.completed:not(.active):not(.current) .step-indicator {
    color: #059669;
    font-weight: 600;
    opacity: 1;
}

.step.active .step-indicator,
.step.current .step-indicator {
    color: #3b82f6;
    font-weight: 600;
    opacity: 1;
}

.step-indicator.loading {
    color: #6c757d;
    font-weight: 500;
    opacity: 0.8;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.step.loading .step-indicator {
    color: #6c757d;
    font-weight: 500;
    opacity: 0.8;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
}

.step.completed:not(.active):not(.current) {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.step.completed:not(.active):not(.current) .step-number {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.step.completed:not(.active):not(.current) .step-label {
    color: #15803d;
    font-weight: 700;
}

/* Main Content */
.main-content {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.step-description {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Materials Header */
.materials-header {
    margin-bottom: 30px;
}

.materials-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Materials Tabs */
.materials-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.materials-content {
    margin-bottom: 40px;
}

.materials-tab {
    display: none;
}

.materials-tab.active {
    display: block;
}

/* Materials Grid */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.material-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Material card overlay removed for cleaner look */

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* Hover overlay effect removed */

.material-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

/* Selected overlay effect removed */

.material-card.user-contributed {
    border-left: 4px solid #28a745;
}

.user-contribution-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.user-contribution-badge i {
    font-size: 0.7rem;
}

.material-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.material-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.material-card p {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.material-properties {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.property {
    background: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #495057;
    border: 1px solid #e9ecef;
}

/* Enhanced Material Card Features */
.material-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.material-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #6c757d;
}

.rating-stars {
    display: flex;
    gap: 2px;
    align-items: center;
}

.rating-star {
    color: #ffd700;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rating-star.empty {
    color: #e9ecef;
}

.rating-star:hover {
    transform: scale(1.1);
}

.material-source {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.material-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.material-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.material-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.material-btn.rating-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Laminate Builder Layout - Clean Structure */
.laminate-builder {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

/* Top Controls Row - Two Column Layout */
.controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tabbed Controls Row - Two Column Layout */
.tabbed-controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Control Tab Styling */
.control-tab {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* Control tab content - always visible */
.control-tab .tab-content {
    padding: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tab-specific control styling */
.control-tab .laminate-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.control-tab .primary-controls,
.control-tab .reset-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-tab .symmetry-controls {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
    flex-wrap: wrap;
}

.control-tab .control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    min-width: 150px;
}

.control-tab .control-group label {
    font-weight: 600;
    color: #374151;
    text-align: left;
}

.control-tab .control-group input,
.control-tab .control-group select {
    width: 100%;
    max-width: 200px;
    text-align: left;
}

.operations-heading {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    padding: 0;
    border: none;
}

/* Middle Section: Current Laminate + Edit Layers */
.middle-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    min-height: 400px;
}

.middle-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-laminate {
    display: flex;
    flex-direction: column;
}

.edit-layers {
    display: flex;
    flex-direction: column;
}

/* Saved Layups Section */
.saved-layups-section {
    margin-top: 30px;
}

/* Saved Layups Header - Outside the tab */
.saved-layups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
}

.saved-layups-header h3 {
    margin: 0;
    flex: 1;
}

.saved-layups-header .btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* Bottom Section: Custom Sequences - Materials Page Style */
.custom-sequences-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Custom sequences section styling removed - no title needed */

.empty-custom-sequences {
    text-align: center;
    color: #6b7280;
    padding: 40px 20px;
}

.empty-custom-sequences i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
    color: #9ca3af;
}

.empty-custom-sequences p {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
}

/* Laminate Visualization - Compact Sidebar */
.laminate-visualization {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    grid-column: 2;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: fit-content;
}

.laminate-visualization h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
    text-align: center;
}

.laminate-plate {
    min-height: 200px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.laminate-plate.plate-empty-state {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: auto;
}

/* Removed shimmer animation to fix glitches */

.plate-empty {
    text-align: center;
    color: #6b7280;
}

.plate-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
    color: #9ca3af;
}

.plate-empty i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.laminate-layers-visual {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    max-width: 400px;
}

.layer-visual {
    height: 20px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
    transition: all 0.3s ease;
}

.layer-visual:hover {
    transform: scaleY(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.layer-visual::after {
    content: attr(data-orientation) '°';
    position: absolute;
    right: 8px;
    font-size: 0.7rem;
}

.layer-visual.symmetric {
    border: 2px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.symmetric-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.symmetric-indicator i {
    font-size: 1rem;
}

/* Operations Section - Left Column */
.operations-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}


/* Symmetry Controls - Right Column */
.symmetry-controls {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    flex-wrap: wrap;
}


.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
    flex: 1;
}

.symmetry-checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 160px;
    flex: 1;
}

.symmetry-checkbox-group > label:first-child {
    margin: 0;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.control-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.control-group input,
.control-group select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 28px;
    height: 28px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.sequence-notation {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-top: 15px;
}

.sequence-notation h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Layer visualization styling */
.layer-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2px;
    border-radius: 4px;
    overflow: hidden;
}

/* Layer visualization styling - simplified without numbers */
.layer-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 2px;
    border-radius: 4px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    text-align: center;
    padding: 4px 8px;
}

/* Gray trash icon for layer actions - Ultra specific to override all other rules */
.laminate-layers .layer-actions .btn.btn-danger {
    background: #6c757d !important;
    background-color: #6c757d !important;
    border: none !important;
    border-color: #6c757d !important;
    color: white !important;
    box-shadow: none !important;
    padding: 8px !important;
    border-radius: 4px !important;
    min-width: auto !important;
    width: auto !important;
}

.laminate-layers .layer-actions .btn.btn-danger:hover {
    background: #5a6268 !important;
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-1px);
    box-shadow: none !important;
}

.laminate-layers .layer-actions .btn.btn-danger i {
    color: white !important;
    background: transparent !important;
}

.notation-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* Stacking Sequences */
.stacking-sequences {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    order: 3;
}

.sequences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sequences-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.sequence-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

/* Clean sequence card implementation */
.sequence-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.sequence-card:hover {
    border-color: #28a745;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.15);
    transform: translateY(-1px);
}

/* Removed selected state for stacking sequence cards */

/* Compact subsection header */
.subsection-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.subsection-header-compact h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Clean custom sequences implementation */
.custom-sequences {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

/* Compact empty state */
.empty-state-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.85rem;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    grid-column: 1 / -1;
    justify-content: center;
}

.empty-state-compact i {
    font-size: 1rem;
    opacity: 0.6;
}

/* Clean sequence card content */
.sequence-header {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sequence-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.2;
    flex: 1;
}

.sequence-description {
    margin-bottom: 8px;
}

.sequence-description p {
    color: #6c757d;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.2;
}

.sequence-preview {
    flex: 1;
    margin: 6px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    background: white;
    padding: 6px 8px;
    border-radius: 4px;
    text-align: center;
    word-break: break-all;
    border: 1px solid #e9ecef;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sequence-actions {
    margin-top: 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.sequence-actions .btn {
    font-size: 0.7rem;
    padding: 4px 8px;
    min-width: auto;
    line-height: 1.1;
    border-radius: 3px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Override global button hover effects for sequence actions */
.sequence-actions .btn:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.sequence-actions .btn-primary:hover {
    background: #5a6fd8 !important;
    border-color: #5a6fd8 !important;
}

.sequence-actions .btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #5a6268 !important;
}

.sequence-actions .btn-danger:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
}

/* Sequence thickness label */
.thickness-label {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid #bbdefb;
    white-space: nowrap;
    margin-left: 8px;
}

/* Responsive design for custom sequences */
@media (max-width: 600px) {
    .custom-sequences {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .custom-sequences {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .custom-sequences {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1201px) {
    .custom-sequences {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Optimize sequence grid for horizontal stacking on larger screens */
@media (min-width: 768px) {
    .sequence-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

@media (min-width: 1024px) {
    .sequence-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
}

/* On very small screens, show 1 column */
@media (max-width: 600px) {
    .sequence-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Laminate Layers Section - Main Content Area */
.laminate-layers-section {
    grid-column: 1;
    grid-row: 1 / -1;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.laminate-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
    align-items: flex-start;
}

.primary-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.reset-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.primary-controls .btn,
.reset-controls .btn {
    width: 180px;
    min-width: 180px;
    flex: 0 0 auto;
}

.laminate-layers {
    min-height: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.empty-laminate {
    text-align: center;
    color: #6c757d;
    background: transparent;
}

.empty-laminate i {
    display: none;
}

.empty-laminate p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.empty-laminate p:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

.laminate-visualization {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
}

.laminate-visualization h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.laminate-plate {
    min-height: 200px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.laminate-plate.plate-empty-state {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: auto;
}

.plate-empty {
    text-align: center;
    color: #6b7280;
}

.plate-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
    color: #9ca3af;
}

.plate-empty i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.laminate-layers-visual {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    max-width: 300px;
}

.layer-visual {
    height: 20px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
}

.layer-visual::after {
    content: attr(data-orientation) '°';
    position: absolute;
    right: 8px;
    font-size: 0.7rem;
}

/* Sequence Notation - Materials Page Style */
.sequence-notation {
    margin-top: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #374151;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

/* Stacking Sequences */
.stacking-sequences {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
}

.stacking-sequences h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.sequence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Enhanced Layer Layout */
.layer-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.layer-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.laminate-layers .layer-number-overlay {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 0.7rem !important;
    z-index: 10 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

.layer-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.layer-material {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.layer-details-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.layer-detail-horizontal {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.layer-detail-horizontal label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.layer-detail-horizontal input,
.layer-detail-horizontal select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.layer-detail-horizontal input:focus,
.layer-detail-horizontal select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Analysis Outputs */
.analysis-outputs {
    margin-bottom: 40px;
}

.analysis-outputs h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.output-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Output card overlay removed for cleaner look */

.output-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* Output card hover overlay removed */

.output-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

/* Output card selected overlay removed */

.output-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.output-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.output-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.properties-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.properties-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.form-actions .btn-group {
    display: flex;
    gap: 10px;
}

.form-actions .btn-group:first-child {
    justify-content: flex-start;
}

.form-actions .btn-group:last-child {
    justify-content: flex-end;
}

/* Material Detail View */
.material-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.material-detail-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.material-detail-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.property-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.property-row:last-child {
    border-bottom: none;
}

.property-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
}

.property-value {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

/* Material Reference Links */
.material-reference-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.material-reference-link:hover {
    color: #0056b3;
    text-decoration: none;
    border-bottom-color: #0056b3;
    transform: translateY(-1px);
}

.material-reference-link:visited {
    color: #6f42c1;
}

.material-reference-link:active {
    color: #004085;
}

/* Material Card Additional Info */
.material-category,
.material-matrix-type {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 5px 0;
    padding: 3px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
}

.material-source {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 10px;
    line-height: 1.4;
}

.material-contributor {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.material-contributor span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.material-contributor strong {
    font-weight: 600;
    color: #495057;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-btn {
    background: #fff;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 40px;
    justify-content: center;
}

.pagination-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn:disabled:hover {
    background: #fff;
    border-color: #e9ecef;
    color: #6c757d;
    transform: none;
}

.pagination-ellipsis {
    color: #6c757d;
    font-weight: 500;
    padding: 0 5px;
}

.pagination-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 10px;
    font-weight: 500;
}

.material-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.material-source-info {
    font-size: 0.9rem;
    color: #6c757d;
}

.material-rating-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Selected Materials */
.selected-materials {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e9ecef;
}

.selected-materials h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.selected-list {
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.empty-state {
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

.selected-material {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-material .remove {
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.selected-material .remove:hover {
    opacity: 1;
}

/* Laminate Builder */
.laminate-builder {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.laminate-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.laminate-layers {
    min-height: 200px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.empty-laminate {
    text-align: center;
    color: #6c757d;
    background: transparent;
}

.empty-laminate i {
    display: none;
}

.empty-laminate p {
    margin: 4px 0;
    font-size: 0.9rem;
}

.empty-laminate p:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

.layer-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.layer-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.layer-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.layer-details {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.layer-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.layer-detail label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.layer-detail input,
.layer-detail select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.layer-detail input:focus,
.layer-detail select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.layer-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Shape and Use Case Selection */
.shape-selection,
.use-case-selection {
    margin-bottom: 40px;
}

.shape-selection h3,
.use-case-selection h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.shape-grid,
.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.shape-card,
.use-case-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Shape and use case card overlays removed for cleaner look */

.shape-card:hover,
.use-case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* Shape and use case card hover overlays removed */

.shape-card.selected,
.use-case-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

/* Shape and use case card selected overlays removed */

.shape-icon,
.use-case-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
}

.shape-card h4,
.use-case-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.shape-card p,
.use-case-card p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Results */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.results-summary h3,
.results-analysis h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.summary-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    font-size: 2.5rem;
    color: #667eea;
}

.summary-content h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.property-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
}

.property-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.property-values {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.property-item:last-child {
    border-bottom: none;
}

.property-label {
    font-weight: 500;
    color: #6c757d;
}

.property-value {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Completed Navigation Buttons */
.btn.completed {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    color: white;
    border-color: #16a34a;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.btn.completed:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn.completed:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Ensure completed state overrides secondary styling */
.btn.btn-secondary.completed {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
    border-color: #16a34a;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.btn-secondary.completed:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.btn-secondary.completed:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Back button specific styling */
#backCustom {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

#backCustom:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

#backCustom:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.3);
}

#backCustom i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

#backCustom:hover i {
    transform: translateX(-2px);
}

#backCustom:active i {
    transform: translateX(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Step Navigation */
.step-navigation {
    display: none; /* Hide bottom bar navigation */
    justify-content: center;
    gap: 15px;
    background: white;
    border-radius: 20px;
    padding: 20px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.step-navigation .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .step-navigation {
        display: flex;
        position: fixed;
        bottom: env(safe-area-inset-bottom, 0);
        left: 0;
        right: 0;
        gap: 10px;
        padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0));
        border-radius: 16px 16px 0 0;
        margin: 0;
        width: 100%;
        z-index: 60;
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
        border: 1px solid #e5e7eb;
    }

    .step-navigation .btn {
        min-width: unset;
        padding: 8px 12px;
        font-size: 0.95rem;
        gap: 6px;
    }

    .container {
        padding-bottom: 110px;
    }

    .progress-container {
        padding: 22px 16px;
        margin-bottom: 12px;
    }

    .main-content {
        padding: 14px 16px 22px;
    }

    .step-description {
        margin-bottom: 16px;
    }

    .materials-header {
        margin-bottom: 14px;
    }

    .materials-controls {
        margin-bottom: 10px;
    }

    .materials-tabs {
        gap: 6px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .tab-btn {
        padding: 8px 10px;
        font-size: 0.95rem;
    }

    .materials-content {
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .step-navigation {
        gap: 8px;
        padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0));
        border-radius: 12px 12px 0 0;
    }

    .step-navigation .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
        gap: 4px;
        border-radius: 6px;
    }

    .step-navigation .btn i {
        font-size: 0.9rem;
    }
}

/* Tools Selection */
.tools-selection {
    margin-bottom: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card.disabled,
.tool-card.under-development {
    cursor: default;
}

.tool-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.tool-card.disabled:hover,
.tool-card.under-development:hover {
    border-color: #e9ecef;
    transform: none;
    box-shadow: none;
}

.tool-card.under-development {
    border-color: #dee2e6;
    background: #f8f9fa;
}

.tool-card.selected {
    border-color: #007bff;
    background: #f8f9ff;
}

.tool-card.paid {
    border-color: #007bff;
}

.tool-card.subscription {
    border-color: #6f42c1;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tool-icon {
    font-size: 2rem;
    color: #007bff;
}

.tool-tier {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.tier-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tool-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.tool-card h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.tool-card p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    flex-grow: 1;
}

.tool-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #666;
}

.tool-category i {
    color: #007bff;
}

.tool-features {
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

.feature-item i {
    color: #28a745;
    font-size: 0.7rem;
}

.tool-actions {
    margin-top: auto;
}

.tool-select-btn {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-select-btn:hover {
    background: #007bff;
    color: white;
}

.tool-select-btn.selected {
    background: #007bff;
    color: white;
}

.tool-purchase-btn {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #007bff;
    background: #007bff;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-purchase-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.tool-disabled-action {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed #ced4da;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-disabled-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tool-card.subscription .tool-purchase-btn {
    background: #6f42c1;
    border-color: #6f42c1;
}

.tool-card.subscription .tool-purchase-btn:hover {
    background: #5a32a3;
    border-color: #5a32a3;
}

.selected-tools {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.selected-tools h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.selected-tool {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

.selected-tool i {
    color: #007bff;
    font-size: 1.1rem;
}

.selected-tool span {
    flex-grow: 1;
    font-weight: 500;
}

.remove-tool-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.remove-tool-btn:hover {
    background: #dc3545;
    color: white;
}

/* Analysis Interface */
.tool-settings {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.tool-settings h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.3rem;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-setting-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-setting-icon {
    font-size: 1.5rem;
    color: #007bff;
}

.tool-setting-info {
    flex-grow: 1;
}

.tool-setting-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.tool-setting-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.tool-setting-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tool-setting-status.ready {
    background: #d4edda;
    color: #155724;
}

.tool-setting-status.configuring {
    background: #fff3cd;
    color: #856404;
}

.analysis-actions {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.analysis-results {
    margin-top: 2rem;
}

.analysis-results h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.5rem;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tool-result {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
}

.tool-result h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-result h4 i {
    color: #007bff;
}

.assumptions-panel {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.assumptions-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.assumptions-panel ul {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.35rem;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.summary-card h5 {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.summary-card .unit {
    font-size: 0.9rem;
    color: #666;
    margin-left: 0.25rem;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.detail-section h5 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.stress-strain-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.stress-strain-table th,
.stress-strain-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.table-item-grid .table-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    height: 100%;
}

.table-block[data-section="stiffness_matrices"] .table-item-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stress-strain-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Enhanced Results Display */
.enhanced-results {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.result-matrix {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.result-matrix h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.result-matrix pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.3;
    background: white;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

.result-object {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.result-object h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.result-object pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.3;
    background: white;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #e9ecef;
    max-height: 300px;
    overflow-y: auto;
}

/* Stress Plot Styling */
.stress-plot-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.stress-plot-container h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.stress-rect-plot-container {
    position: relative;
}

.stress-rect-plot {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.stress-rect-plot-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2a37;
}

.stress-layer-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: var(--stress-stack-min-height, 320px);
}

.stress-layer-stack-single {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.stress-layer-card {
    background: #ffffff;
    border: 1px solid #dde2e8;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: var(--layer-thickness, 1);
    flex-basis: 0;
    flex-shrink: 1;
    min-height: var(--stress-layer-estimated-height, 64px);
}

.stress-layer-card-single {
    background: radial-gradient(120% 140% at 50% 0%, rgba(30, 64, 175, 0.22) 0%, rgba(15, 23, 42, 0.9) 60%, rgba(15, 23, 42, 1) 100%);
    border-color: #1e293b;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.25), 0 12px 24px rgba(15, 23, 42, 0.35);
    color: #e2e8f0;
    padding: 14px 18px;
    gap: 10px;
}

.stress-layer-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
}

.stress-layer-card-single .stress-layer-header {
    justify-content: space-between;
    align-items: center;
    color: #cbd5f5;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    gap: 12px;
}

.stress-layer-header span {
    font-weight: 500;
}

.stress-layer-label {
    font-weight: 700;
    color: #1f2937;
}

.stress-layer-card-single .stress-layer-label {
    color: #f8fafc;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
}

.stress-layer-component-caption {
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.stress-layer-orientation,
.stress-layer-thickness {
    font-size: 0.9rem;
    color: #475569;
}

.stress-layer-card-single .stress-layer-orientation,
.stress-layer-card-single .stress-layer-thickness {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.75);
}

.stress-value-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stress-value-list-single {
    gap: 14px;
}

.stress-value-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.stress-value-row.surface-row {
    gap: 10px;
}

.stress-value-row-single {
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
}

.stress-value-label {
    flex: 0 0 70px;
    font-weight: 600;
    color: #1f2937;
}

.stress-surface-label {
    min-width: 120px;
}

.stress-layer-card-single .stress-value-label {
    flex: 0 0 auto;
    min-width: 42px;
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.stress-layer-index {
    flex: 0 0 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: rgba(248, 250, 252, 0.88);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.stress-value {
    flex: 0 0 140px;
    font-family: 'Fira Code', 'Source Code Pro', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #1f2937;
}

.stress-value-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.stress-layer-card-single .stress-value {
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.8rem;
}

.stress-value[data-sign="positive"] {
    color: #0f766e;
}

.stress-value[data-sign="negative"] {
    color: #b91c1c;
}

.stress-value[data-sign="missing"] {
    opacity: 0.55;
}

.stress-bar-track {
    flex: 1 1 180px;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.stress-bar-track-single {
    height: 18px;
    padding: 2px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(100, 116, 139, 0.45);
    justify-content: flex-start;
}

.stress-bar-track-single[data-range-state="collapsed"] {
    justify-content: center;
    background: rgba(148, 163, 184, 0.22);
    border-style: dashed;
}

.stress-bar-track-single::before {
    content: '';
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 50%;
    width: 1px;
    background: rgba(148, 163, 184, 0.4);
    pointer-events: none;
}

.stress-bar-track-single.negative {
    justify-content: flex-end;
}

.stress-bar-track-single.zero {
    justify-content: center;
}

.stress-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.3s ease, background-color 0.3s ease;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.stress-bar-fill-arrow {
    position: relative;
    clip-path: polygon(0 0, 95% 0, 100% 50%, 95% 100%, 0 100%);
    min-width: 8px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.stress-bar-fill-arrow[data-range-state="collapsed"] {
    min-width: 48px;
    padding: 0 12px;
    clip-path: inset(0 round 12px);
    background: rgba(148, 163, 184, 0.45) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.4);
}

.stress-bar-fill-arrow[data-polarity="negative"] {
    clip-path: polygon(0 50%, 6% 0, 100% 0, 100% 100%, 6% 100%);
}

.stress-bar-fill-arrow[data-polarity="missing"] {
    background: rgba(148, 163, 184, 0.35) !important;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.stress-bar-fill-arrow::after {
    content: attr(data-value-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Fira Code', 'Source Code Pro', 'Courier New', monospace;
    font-size: 0.7rem;
    color: rgba(248, 250, 252, 0.95);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.6);
    letter-spacing: 0.04em;
    white-space: nowrap;
    pointer-events: none;
}

.stress-bar-fill-arrow[data-range-state="collapsed"]::after {
    color: rgba(15, 23, 42, 0.85);
    text-shadow: none;
    font-weight: 600;
}

.stress-bar-fill.negative {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.35) 75%, transparent 75%, transparent);
    background-size: 12px 12px;
}

.stress-bar-fill.zero {
    background: rgba(148, 163, 184, 0.45);
}

.stress-bar-fill.no-data {
    background: #cbd5f5;
    opacity: 0.35;
}

.stress-value-row.stress-value-missing .stress-bar-track {
    opacity: 0.45;
}

.plot-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    align-items: center;
}

.plot-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.plot-controls input[type="radio"] {
    margin: 0;
}

.plot-controls select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

#stress-plot-thermal,
#stress-plot-stiffness {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

/* Laminate Stiffness Constants Plot */
.constants-plot-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.constants-plot-container h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

#constants-plot {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

/* Responsive Design for Plots */
@media (max-width: 768px) {
    .plot-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .enhanced-results {
        font-size: 10px;
        padding: 10px;
    }
    
    .result-matrix pre,
    .result-object pre {
        font-size: 10px;
    }
}

.stress-strain-table td {
    font-size: 0.95rem;
}

.stress-strain-table tr:hover {
    background: #f8f9fa;
}

/* Yellow Flag Notifications */
.flag-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3), 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: flagSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.flag-notification::before {
    content: "⚠️";
    font-size: 24px;
    flex-shrink: 0;
}

.flag-notification .flag-content {
    flex: 1;
    color: #92400e;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

.flag-notification .flag-close {
    background: none;
    border: none;
    color: #92400e;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.flag-notification .flag-close:hover {
    background: rgba(146, 64, 14, 0.1);
    transform: scale(1.1);
}

@keyframes flagSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.flag-notification.fade-out {
    animation: flagSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flagSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

/* Analysis Configuration */
.analysis-config {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.config-info {
    text-align: center;
    color: #6c757d;
}

.config-info h3 {
    color: #333;
    margin-bottom: 10px;
}

.geometry-selection {
    margin-bottom: 30px;
}

.geometry-selection h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.geometry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.geometry-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.geometry-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.geometry-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.geometry-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
}

.geometry-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.geometry-card p {
    color: #6c757d;
    font-size: 0.85rem;
}

.geometry-inputs {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.geometry-inputs h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.input-group input,
.input-group select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.load-case-config {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}

.load-case-config h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.load-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.failure-criteria {
    margin-bottom: 30px;
}

.failure-criteria h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.criteria-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.criteria-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.criteria-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.criteria-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.criteria-card p {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Results */
.displacement-locations {
    margin-bottom: 20px;
}

.displacement-locations h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.location-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.location-card h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.location-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.failure-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.failure-summary {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}

.failure-summary h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.failure-status {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.failure-status.safe {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.failure-status.failed {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.failure-details {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
}

.failure-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.sequence-preview {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
}

/* Section Headers */
.section-header {
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.section-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* Laminate Layers Section */
.laminate-layers-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.laminate-layers-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .middle-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .controls-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tabbed-controls-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .operations-section {
        text-align: center;
    }

    .symmetry-controls {
        flex-direction: column;
        gap: 16px;
    }

    .progress-steps {
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 16px;
        overflow-x: auto;
        padding-inline: 8px;
        padding-block: 6px;
        scroll-snap-type: x proximity;
        scroll-padding-inline-start: 12px;
        -ms-overflow-style: none;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .progress-steps::-webkit-scrollbar {
        display: none;
    }

    .step {
        flex: 0 0 auto;
        min-width: 220px;
        padding: 16px 14px;
        gap: 12px;
        scroll-snap-align: start;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .step-number {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        border-width: 2px;
    }

    .step.active .step-number,
    .step.current .step-number {
        transform: scale(1.02);
    }

    .step-label {
        font-size: 0.9rem;
        line-height: 1.3;
        text-align: center;
    }

    .step-indicator {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .main-content {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .step {
        min-width: 180px;
        padding: 12px 10px;
        gap: 10px;
    }

    .progress-steps {
        gap: 12px;
        padding-inline: 4px;
        padding-block: 4px;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-width: 2px;
    }

    .step-label {
        font-size: 0.8rem;
        line-height: 1.2;
        text-align: center;
    }

    .step-indicator {
        display: none;
    }
    
    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .controls-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tabbed-controls-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .control-tab .tab-content {
        min-height: auto;
        padding: 16px;
    }
    
    .control-tab .laminate-controls {
        gap: 12px;
    }
    
    .control-tab .primary-controls,
    .control-tab .reset-controls {
        gap: 8px;
    }
    
    .control-tab .symmetry-controls {
        gap: 16px;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .laminate-controls {
        justify-content: center;
        align-items: center;
    }
    
    .primary-controls,
    .reset-controls {
        justify-content: center;
    }
    
    .symmetry-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .control-group {
        min-width: auto;
    }
    
    .shape-grid,
    .use-case-grid,
    .output-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .laminate-controls {
        flex-direction: column;
    }
    
    .primary-controls,
    .reset-controls {
        flex-direction: column;
    }
    
    .layer-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .layer-details-horizontal {
        grid-template-columns: 1fr;
    }
    
    .layer-actions {
        justify-content: center;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .sequence-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .material-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .step-content h2 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 20px;
    }

    .progress-steps {
        justify-content: center;
        gap: 10px;
        padding: 0 8px 10px;
    }

    .step {
        flex: 0 0 160px;
        min-width: 160px;
        padding: 12px 8px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .step-indicator {
        font-size: 0.7rem;
    }
}

/* Custom Tools Styles */
.add-custom-tool-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.add-custom-tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.custom-tools-modal {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.custom-tools-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-btn:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Override for control tab content - always visible */
.control-tab .tab-content {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 200px;
}

.custom-tools-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.tools-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tools-list-header h3 {
    color: #333;
    margin: 0;
}

.custom-tool-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.custom-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tool-header h4 {
    color: #333;
    margin: 0;
    font-size: 1.2rem;
}

.tool-actions {
    display: flex;
    gap: 8px;
}

.tool-info {
    color: #6c757d;
}

.tool-description {
    margin-bottom: 10px;
    font-style: italic;
}

.tool-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.tool-version {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.no-tools {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-tools i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #dee2e6;
}

.create-tool-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.property-desc {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: normal;
    font-style: italic;
}

.material-privacy-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: auto;
}

.material-privacy-badge.public {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.material-privacy-badge.private {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #007bff;
}

.loading-state p {
    margin: 0;
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.api-documentation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.api-section {
    margin-bottom: 30px;
}

.api-section h4 {
    color: #007bff;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e9ecef;
}

.api-method {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.api-method code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d63384;
    font-weight: 600;
}

.api-method p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.result-info {
    background: #e9ecef;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.result-info p {
    margin: 5px 0;
    font-weight: 500;
}

.result-data pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
    border: 1px solid #e9ecef;
}

/* Custom Tools Responsive */
@media (max-width: 768px) {
    .custom-tools-modal {
        width: 98%;
        margin: 2% auto;
    }
    
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tool-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .api-documentation {
        max-height: 400px;
    }
}

/* Error State Styles */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 12px;
    border: 2px solid #f5c6cb;
}

.error-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #dc3545;
}

.error-state h3 {
    margin-bottom: 10px;
    color: #721c24;
}

.error-state p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #721c24;
}

.error-state .btn {
    margin-top: 10px;
}

/* ===== INLINE CSS EXTRACTED FROM INDEX.HTML ===== */

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    padding: 20px;
}

.pagination-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #6c757d;
    font-weight: bold;
}

/* Material Selection Styles */
.material-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.material-card.selected::before {
    transform: scaleX(1);
}

.material-card.selected .material-icon {
    color: #667eea;
}

/* Selected Materials Counter */
.materials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.selected-count {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-count i {
    font-size: 16px;
}

/* Materials Controls */
.materials-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    padding: 0;
}

.materials-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tab-btn {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.tab-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.materials-actions {
    display: flex;
    gap: 12px;
}

/* Improved Material Cards */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.material-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.material-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.material-card.selected {
    border-color: #28a745;
    background: #f8fff8;
}

.material-card.private {
    border-color: #ffc107;
    background: #fffdf0;
}

.material-card.user-contributed {
    border-color: #17a2b8;
    background: #f0f9ff;
}

.material-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.material-icon {
    font-size: 24px;
    color: #6c757d;
}

.material-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* Duplicate removed - see above for rating-star styles */

.rating-count {
    font-size: 12px;
    color: #6c757d;
}

/* Navigation Guard Flags */
#navigation-flags {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 300px;
    pointer-events: none;
}

.navigation-flag {
    background: #ffc107;
    color: #212529;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.navigation-flag:hover {
    transform: translateX(0) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.rating-controls-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.rating-display-only {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.rating-section {
    margin: 16px 0;
}

.rating-controls-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.rating-btn-detail {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-btn-detail:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.rating-btn-detail.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.rating-btn-detail.thumbs-down.active {
    background: #dc3545;
    border-color: #dc3545;
}

.rating-count-detail {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.rating-btn-inline {
    background: none;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.rating-btn-inline:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.rating-btn-inline.active {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.rating-btn-inline.thumbs-down.active {
    background: #dc3545;
    border-color: #dc3545;
}

.material-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #212529;
}

.material-description {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.material-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.user-contribution-badge,
.private-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.user-contribution-badge {
    background: #d1ecf1;
    color: #0c5460;
}

.private-badge {
    background: #fff3cd;
    color: #856404;
}

.material-properties {
    margin-bottom: 12px;
}

.property-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
}

.property {
    font-size: 12px;
    color: #495057;
    font-weight: 500;
}

.material-source {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 12px;
    font-style: italic;
}

.material-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding: 0;
    border: none;
}

.material-btn {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.material-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
}

.material-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.material-toggle-privacy-btn {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.material-toggle-privacy-btn:hover {
    background: #5a6268;
    border-color: #5a6268;
    color: white;
}

.material-delete-btn {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.material-delete-btn:hover {
    background: #c82333;
    border-color: #c82333;
    color: white;
}

.rating-controls {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.rating-btn {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-btn:hover {
    background: #f8f9fa;
}

.rating-btn.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.rating-btn.thumbs-down.active {
    background: #dc3545;
    border-color: #dc3545;
}

/* Material Detail Modal */
.material-detail {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.material-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.material-detail-header h2 {
    margin: 0;
    color: #212529;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
}

.close-btn:hover {
    color: #495057;
}

.material-detail-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.material-detail-section {
    margin-bottom: 24px;
}

.material-detail-section h3 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 18px;
}

/* Enhanced Material Detail Content */
.material-detail-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.material-info {
    margin-bottom: 24px;
}

.material-description {
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 16px;
}

.material-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.meta-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.meta-item strong {
    color: #495057;
    margin-right: 8px;
}

.material-properties-section {
    margin-bottom: 24px;
}

.material-properties-section h3 {
    color: #212529;
    font-size: 20px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.property-group {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.property-group h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.property-item:last-child {
    border-bottom: none;
}

.property-label {
    font-weight: 500;
    color: #495057;
    flex: 1;
}

.property-value {
    font-weight: 600;
    color: #212529;
    text-align: right;
    min-width: 100px;
}

.user-contribution-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #e3f2fd;
    border-radius: 6px;
    color: #1976d2;
    font-size: 14px;
    margin-top: 16px;
}

.user-contribution-info i {
    font-size: 16px;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.property-label {
    font-weight: 500;
    color: #495057;
}

.property-value {
    font-weight: 600;
    color: #212529;
}

/* Modal Subtitle Styles */
.modal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.modal-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.modal-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 0;
}

.modal-subtitle i {
    color: #ffc107;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6c757d;
    padding: 4px;
}

.modal-close:hover {
    color: #dc3545;
}

/* Predefined and Custom Sequences Styling */
.predefined-sequences,
.custom-sequences-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.predefined-sequences h4,
.custom-sequences-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.sequence-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}





.sequence-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #495057;
    text-align: center;
}

/* Compact Subsection Layout */
.laminate-subsections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.laminate-subsection {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.subsection-header {
    margin-bottom: 12px;
    text-align: left;
}

.subsection-header h4 {
    margin: 0 0 4px 0;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subsection-header p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.laminate-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.symmetry-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-outline {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-outline i {
    font-size: 11px;
    opacity: 0.7;
}

.custom-sequences-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.symmetry-controls .control-group {
    min-width: 120px;
}

.symmetry-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.symmetry-section h5 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.control-group label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.control-group input,
.control-group select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #007bff;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.predefined-sequences h5 {
    margin: 20px 0 15px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}


.sequence-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sequence-header h4 {
    margin: 0;
    color: #212529;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.sequence-header p {
    margin: 0;
    color: #6c757d;
    font-size: 12px;
    flex: 1;
    text-align: right;
}






.laminate-layers {
    flex: 1;
    min-height: 150px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-laminate {
    text-align: center;
    color: #6c757d;
    background: transparent;
}

.empty-laminate i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #dee2e6;
}

.empty-laminate p {
    margin: 5px 0;
    font-size: 14px;
}

/* Layer Modifier Improvements */
.layer-details-horizontal {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.layer-detail-horizontal {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.layer-detail-horizontal label {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

.layer-input-short {
    width: 120px !important;
    padding: 6px 8px !important;
    font-size: 13px !important;
}

.layer-actions {
    margin-left: auto;
}

.layer-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.layer-number {
    background: #007bff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
}

/* Verification Modal Styles */
.verification-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
}

.verification-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.verification-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#verificationCode {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Thermal Analysis Configuration Styles */
.thermal-loading-config,
.mechanical-loading-config,
.thermal-options-config {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.thermal-loading-config h5,
.mechanical-loading-config h5,
.thermal-options-config h5 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

/* Input row styling for mechanical loading */
.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.input-row .input-group {
    flex: 1;
    min-width: 150px;
}

/* Checkbox group styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

.checkbox-item label {
    margin: 0;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.input-row .input-group {
    flex: 1;
    min-width: 150px;
}

.input-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background-color: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-radius: 3px;
    background: white;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Override any red styling in layer elements to match materials page style */
.laminate-layers * {
    background-color: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

.laminate-layers .layer-visual {
    background-color: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}

.laminate-layers .layer-item {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}

/* About This Site Link Styles */
.about-site-link {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.about-site-link.scroll-aware {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 20px);
}

.about-site-link.scroll-aware.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.about-site-trigger {
    position: relative;
    width: 100%;
    height: 1px;
}

.about-site-link .btn-link {
    background: rgba(37, 99, 235, 0.9);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-site-link .btn-link:hover {
    background: rgba(37, 99, 235, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.about-site-link .btn-link i {
    font-size: 1rem;
}

/* About Modal Styles */
#aboutSiteModal .modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.about-content {
    padding: 0;
}

.about-content .mission-section,
.about-content .disclaimer-section,
.about-content .contact-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.about-content .mission-section {
    border-left-color: #10b981;
}

.about-content .disclaimer-section {
    border-left-color: #f59e0b;
}

.about-content .contact-section {
    border-left-color: #8b5cf6;
}

.about-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-content h4 i {
    font-size: 1rem;
    color: #6b7280;
}

.about-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 12px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.disclaimer-content p {
    margin-bottom: 16px;
    padding: 12px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

.disclaimer-content p strong {
    color: #92400e;
    font-weight: 600;
}

/* SEO and navigation enhancements */
.primary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 4px;
}

.primary-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-nav .nav-link:hover,
.primary-nav .nav-link:focus-visible {
    background: #dbeafe;
    transform: translateY(-1px);
}

.primary-nav .nav-link i {
    color: #4338ca;
    font-size: 1.05rem;
}

.primary-nav .nav-link.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.primary-nav .nav-link.active i {
    color: #fff;
}

@media (max-width: 1024px) {
    .primary-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 10px;
    }

    .primary-nav .nav-link {
        width: 100%;
        justify-content: center;
        gap: 10px;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 0.95rem;
    }
}

@media (min-width: 1025px) {
    .primary-nav {
        display: none;
    }
}

.hero-copy {
    margin: 10px 0 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.hero-copy p {
    margin: 0 0 10px;
    color: #1f2937;
    line-height: 1.6;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags .tag {
    background: #2563eb;
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.anchor-target {
    position: relative;
    top: -100px;
    height: 0;
    width: 1px;
}

.seo-section {
    margin: 32px 0 0;
    padding: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    font-weight: 700;
    margin: 0 0 4px;
}

.section-lede {
    margin: 6px 0 0;
    color: #374151;
    max-width: 820px;
    line-height: 1.6;
}

.section-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-cta .cta-label {
    font-weight: 700;
    color: #1f2937;
}

.guide-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.guide-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

.guide-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #1f2937;
}

.guide-card p {
    margin: 0;
    color: #4b5563;
    line-height: 1.5;
}

.faq-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.faq-item h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #111827;
}

.faq-item p {
    margin: 0;
    color: #374151;
    line-height: 1.5;
}

.site-footer {
    margin-top: 18px;
    padding: 14px 12px 6px;
    border-top: 1px solid #e5e7eb;
    color: #4b5563;
    text-align: center;
}

.site-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.site-footer a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
}

/* Modal subtitle styling */
.modal-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 8px;
    font-weight: 500;
}

.modal-subtitle i {
    color: #f59e0b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-site-link {
        bottom: 15px;
    }

    .about-site-link.scroll-aware {
        transform: translate(-50%, 20px);
    }

    .about-site-link.scroll-aware.visible {
        transform: translate(-50%, 0);
    }

    .about-site-link .btn-link {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    #aboutSiteModal .modal-content {
        max-width: 95vw;
        margin: 20px;
    }
    
    .about-content .mission-section,
    .about-content .disclaimer-section,
    .about-content .contact-section {
        padding: 16px;
        margin-bottom: 20px;
    }
}
