/* ペロブスカイト太陽電池解説サイト カスタムCSS */

/* フォント設定 */
body {
    font-family: 'Noto Sans JP', sans-serif;
}

/* 共通クラス */
.section-padding {
    padding: 40px 0;
}

.container {
    max-width: 1200px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
}

/* ナビゲーション */
.nav-link {
    @apply text-gray-700 hover:text-blue-600 px-3 py-2 rounded-md text-sm font-medium transition-colors duration-200;
}

.mobile-nav-link {
    @apply block text-gray-700 hover:text-blue-600 hover:bg-gray-50 px-3 py-2 rounded-md text-base font-medium transition-colors duration-200;
}

/* ヒーローセクション */
.hero-section {
    min-height: 34vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 3rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" style="stop-color:%23ffffff;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%23ffffff;stop-opacity:0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/><circle cx="900" cy="800" r="80" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

/* カード */
.card {
    @apply bg-white rounded-lg shadow-lg p-4 hover:shadow-xl transition-shadow duration-300;
}

.card-title {
    @apply text-xl font-semibold mb-3 flex items-center;
}

.feature-card {
    @apply bg-white rounded-lg shadow-lg p-6 text-center hover:shadow-xl hover:transform hover:scale-105 transition-all duration-300;
}

.nav-card {
    @apply bg-white rounded-lg shadow-lg p-6 text-center hover:shadow-xl hover:transform hover:scale-105 transition-all duration-300 block no-underline text-gray-800;
}

/* テーブル */
.data-table {
    @apply w-full bg-white shadow-lg rounded-lg overflow-hidden;
}

.data-table th {
    @apply bg-gray-50 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.data-table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.data-table tr:nth-child(even) {
    @apply bg-gray-50;
}

/* 比較テーブル */
.comparison-table {
    @apply w-full shadow-lg rounded-lg overflow-hidden;
}

.comparison-table th {
    @apply bg-gradient-to-r from-blue-600 to-purple-600 text-white px-4 py-3 text-sm font-semibold;
}

.comparison-table td {
    @apply px-4 py-3 text-sm border-b border-gray-200;
}

.comparison-table tr:nth-child(even) td {
    @apply bg-gray-50;
}

/* アコーディオン */
.accordion-item {
    @apply border border-gray-200 rounded-lg mb-4 overflow-hidden;
}

.accordion-header {
    @apply bg-gray-50 px-6 py-4 cursor-pointer hover:bg-gray-100 transition-colors duration-200;
}

.accordion-content {
    @apply px-6 py-4 bg-white hidden;
}

.accordion-content.active {
    @apply block;
}

/* プログレスバー */
.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-3 overflow-hidden;
}

.progress-fill {
    @apply h-full bg-gradient-to-r from-green-400 to-blue-500 transition-all duration-1000 ease-out;
}

/* タブ */
.tab-buttons {
    @apply flex flex-wrap justify-center gap-3 mb-0;
}

.tab-button {
    @apply px-6 py-4 text-sm font-semibold text-gray-600 hover:text-gray-800 hover:bg-gray-100 border-2 border-gray-300 rounded-xl transition-all duration-300 cursor-pointer shadow-md hover:shadow-lg relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-button:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tab-button.active {
    @apply text-white border-blue-500;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.tab-button.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.3;
}

.tab-button.active::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #10b981;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tab-content {
    @apply hidden;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    @apply block;
}

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

/* タブコンテンツの確実な非表示 */
.tab-content:not(.active) {
    display: none !important;
}

/* Font Awesome アイコンの表示確保 */
.fas, .far, .fab {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ナビゲーションアイコンのスタイル */
.nav-link i, .mobile-nav-link i {
    display: inline-block;
    width: 16px;
    text-align: center;
    margin-right: 8px;
}

/* チャートコンテナ */
.chart-container {
    @apply bg-white rounded-lg shadow-lg p-6 mb-8;
    min-height: auto;
    height: auto;
    display: block;
    overflow: visible;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 400px;
    height: 400px !important;
    width: 100% !important;
}

/* レーダーチャート専用のスタイル */
.chart-container canvas[data-chart-type="radar"] {
    max-height: 400px;
    width: 100%;
    height: 400px;
}

/* レーダーチャートコンテナの高さ制限 */
.chart-container:has(canvas[data-chart-type="radar"]) {
    height: auto;
    min-height: auto;
    overflow: visible;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

.loading-spinner {
    animation: loadingSpinner 1s linear infinite;
}

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

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-padding {
        padding: 30px 0;
    }
    
    .hero-section {
        min-height: 60vh;
    }
    
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
    
    /* チャートコンテナのモバイル最適化 */
    .chart-container {
        height: 300px;
        margin-bottom: 1rem;
    }
    
    /* ナビゲーションカードのモバイル最適化 */
    .nav-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* 効率記録カードのモバイル最適化 */
    .card .text-2xl {
        font-size: 1.5rem;
    }
    
    /* タイムラインのモバイル最適化 */
    .timeline-item {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-item .w-1\/2 {
        width: 100%;
        padding: 0;
    }
}

@media (max-width: 640px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .bg-white {
        @apply bg-gray-800;
    }
    
    .text-gray-900 {
        @apply text-white;
    }
    
    .text-gray-700 {
        @apply text-gray-300;
    }
    
    .text-gray-600 {
        @apply text-gray-400;
    }
}

/* 印刷スタイル */
@media print {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .shadow-lg {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .bg-gradient-to-r {
        background: #f9fafb !important;
        color: #374151 !important;
    }
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* パフォーマンス最適化 */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* クリティカルCSSの最適化 */
.hero-section {
    will-change: transform;
}

.card {
    will-change: transform;
    backface-visibility: hidden;
}

/* フォント最適化 */
@font-face {
    font-family: 'Noto Sans JP';
    font-display: swap;
}

/* 画像最適化 */
img {
    max-width: 100%;
    height: auto;
}

/* アニメーション最適化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* キーボードナビゲーション */
.keyboard-navigation *:focus {
    outline: 2px solid #3b82f6 !important;
    outline-offset: 2px !important;
}

/* フォーカス管理 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
    }
}

/* プリント用スタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Energy Band Diagram Styles */
.energy-band-diagram {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.band-level {
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    position: relative;
}

.band-label {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.band-gap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gap-label {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

.band-arrows {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.arrow-up, .arrow-down {
    color: #3b82f6;
    font-weight: bold;
    font-size: 12px;
    margin: 5px 0;
}

/* Process Flow Styles */
.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 120px;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.step-content h4 {
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    font-size: 14px;
}

.step-content p {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.flow-arrow {
    font-size: 24px;
    color: #3b82f6;
    font-weight: bold;
    margin: 0 10px;
}

       /* Responsive adjustments for process flow */
       @media (max-width: 768px) {
           .process-flow {
               flex-direction: column;
               gap: 15px;
           }
           
           .flow-arrow {
               transform: rotate(90deg);
               margin: 10px 0;
           }
           
           .flow-step {
               min-width: 100px;
           }
       }

       /* Carrier Transport Diagram Styles */
       .carrier-transport-diagram {
           background: #ffffff;
           border: 3px solid #3b82f6;
           border-radius: 16px;
           padding: 25px;
           margin: 25px 0;
           overflow-x: auto;
           box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
       }

       .layer-structure {
           display: flex;
           gap: 15px;
           align-items: flex-start;
           min-height: 250px;
           background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
           padding: 20px;
           border-radius: 12px;
       }

       .layer {
           flex: 1;
           border: 3px solid #1e40af;
           border-radius: 12px;
           padding: 20px;
           position: relative;
           display: flex;
           flex-direction: column;
           justify-content: flex-start;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
           min-height: 200px;
           max-height: 300px;
       }

       .tco-layer {
           background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
           border-color: #64748b;
       }

       .htl-layer {
           background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
           border-color: #d97706;
       }

       .perovskite-layer {
           background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
           border-color: #dc2626;
       }

       .etl-layer {
           background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
           border-color: #059669;
       }

       .counter-electrode {
           background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
           border-color: #3b82f6;
       }

       .layer-label {
           font-weight: 700;
           color: #1f2937;
           margin-bottom: 15px;
           text-align: center;
           font-size: 14px;
           background: rgba(255, 255, 255, 0.8);
           padding: 8px;
           border-radius: 6px;
           border: 2px solid #374151;
       }

       .energy-bands {
           flex: 1;
           display: flex;
           flex-direction: column;
           justify-content: flex-start;
           position: relative;
           gap: 8px;
           margin-top: 10px;
       }

       .conduction-band {
           background: linear-gradient(90deg, #3b82f6, #1d4ed8);
           color: white;
           padding: 12px;
           border-radius: 8px;
           text-align: center;
           font-size: 12px;
           font-weight: 600;
           border: 2px solid #1e40af;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
       }

       .valence-band {
           background: linear-gradient(90deg, #ef4444, #dc2626);
           color: white;
           padding: 12px;
           border-radius: 8px;
           text-align: center;
           font-size: 12px;
           font-weight: 600;
           border: 2px solid #b91c1c;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
       }

       .trap-level {
           background: linear-gradient(90deg, #f59e0b, #d97706);
           color: white;
           padding: 10px;
           border-radius: 6px;
           text-align: center;
           font-size: 11px;
           font-weight: 600;
           margin: 5px 0;
           border: 2px solid #d97706;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
       }

       .carrier-flow {
           position: absolute;
           top: 50%;
           right: -25px;
           transform: translateY(-50%);
           display: flex;
           flex-direction: column;
           align-items: center;
           font-size: 12px;
           font-weight: 700;
           background: rgba(255, 255, 255, 0.9);
           padding: 8px;
           border-radius: 8px;
           border: 2px solid #374151;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
           z-index: 10;
       }

       .hole-flow {
           color: #dc2626;
       }

       .electron-flow {
           color: #2563eb;
       }

       .excitation-process {
           position: absolute;
           top: 50%;
           left: 50%;
           transform: translate(-50%, -50%);
           text-align: center;
           background: rgba(255, 255, 255, 0.9);
           padding: 15px;
           border-radius: 12px;
           border: 3px solid #f59e0b;
           box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
       }

       .excitation-arrow {
           color: #d97706;
           font-weight: bold;
           font-size: 16px;
           margin-bottom: 10px;
           text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
       }

       .carrier-generation {
           display: flex;
           gap: 15px;
           justify-content: center;
       }

       .electron, .hole {
           background: white;
           border: 3px solid;
           border-radius: 50%;
           width: 30px;
           height: 30px;
           display: flex;
           align-items: center;
           justify-content: center;
           font-weight: bold;
           font-size: 14px;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
       }

       .electron {
           border-color: #2563eb;
           color: #2563eb;
       }

       .hole {
           border-color: #dc2626;
           color: #dc2626;
       }

       .transport-arrows {
           display: flex;
           justify-content: space-between;
           margin-top: 30px;
           padding: 0 30px;
           background: rgba(255, 255, 255, 0.8);
           border-radius: 12px;
           padding: 20px;
       }

       .arrow {
           display: flex;
           flex-direction: column;
           align-items: center;
           font-size: 14px;
           font-weight: 700;
           background: rgba(255, 255, 255, 0.9);
           padding: 15px;
           border-radius: 10px;
           border: 2px solid #374151;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
       }

       .electron-arrow {
           color: #2563eb;
       }

       .hole-arrow {
           color: #dc2626;
       }

       /* Recombination Diagram Styles */
       .recombination-diagram {
           background: #ffffff;
           border: 3px solid #dc2626;
           border-radius: 16px;
           padding: 25px;
           margin: 25px 0;
           box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
       }

       .trap-capture {
           position: absolute;
           top: 50%;
           right: -35px;
           transform: translateY(-50%);
           display: flex;
           flex-direction: column;
           align-items: center;
           font-size: 12px;
           font-weight: 700;
           background: rgba(255, 255, 255, 0.9);
           padding: 10px;
           border-radius: 8px;
           border: 2px solid #dc2626;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
           z-index: 10;
       }

       .recombination-process {
           position: absolute;
           top: 50%;
           left: 50%;
           transform: translate(-50%, -50%);
           text-align: center;
           background: rgba(255, 255, 255, 0.95);
           padding: 25px;
           border-radius: 15px;
           border: 4px solid #dc2626;
           box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
           min-width: 200px;
           z-index: 20;
       }

       .recombination-arrow {
           color: #dc2626;
           font-weight: bold;
           font-size: 20px;
           margin-bottom: 15px;
           text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
       }

       .energy-loss {
           color: #991b1b;
           font-size: 16px;
           font-weight: 700;
           background: rgba(153, 27, 27, 0.15);
           padding: 12px;
           border-radius: 8px;
           border: 3px solid #991b1b;
           margin-top: 10px;
           display: block;
       }

       .recombination-explanation {
           display: grid;
           grid-template-columns: 1fr 1fr;
           gap: 25px;
           margin-top: 30px;
           background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
           padding: 25px;
           border-radius: 12px;
       }

       .explanation-box {
           background: white;
           padding: 20px;
           border-radius: 12px;
           border: 3px solid #374151;
           box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
       }

       /* Simplified Process Styles */
       .simplified-process {
           display: flex;
           align-items: center;
           justify-content: center;
           flex-wrap: wrap;
           gap: 20px;
           padding: 30px;
           background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
           border-radius: 16px;
           margin: 20px 0;
       }

       .process-step {
           display: flex;
           flex-direction: column;
           align-items: center;
           text-align: center;
           min-width: 150px;
           position: relative;
       }

       .step-number {
           position: absolute;
           top: -10px;
           right: -10px;
           background: #3b82f6;
           color: white;
           width: 30px;
           height: 30px;
           border-radius: 50%;
           display: flex;
           align-items: center;
           justify-content: center;
           font-weight: bold;
           font-size: 14px;
           z-index: 10;
       }

       .step-content {
           background: white;
           padding: 20px;
           border-radius: 12px;
           box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
           border: 2px solid #e5e7eb;
           width: 100%;
       }

       .step-icon {
           width: 60px;
           height: 60px;
           border-radius: 50%;
           display: flex;
           align-items: center;
           justify-content: center;
           margin: 0 auto 15px;
           box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
       }

       .step-title {
           font-size: 16px;
           font-weight: 600;
           color: #1f2937;
           margin-bottom: 8px;
       }

       .step-description {
           font-size: 14px;
           color: #6b7280;
           line-height: 1.4;
       }

       .process-arrow {
           font-size: 24px;
           color: #3b82f6;
           font-weight: bold;
           margin: 0 10px;
       }

       /* Layer Visualization */
       .layer-visualization {
           margin-top: 30px;
           padding: 20px;
           background: #f9fafb;
           border-radius: 12px;
       }

       .layer-stack {
           display: flex;
           flex-direction: column;
           gap: 10px;
           max-width: 400px;
           margin: 0 auto;
       }

       .layer-item {
           display: flex;
           align-items: center;
           background: white;
           padding: 15px;
           border-radius: 8px;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
           border-left: 4px solid;
       }

       .layer-item.tco-layer {
           border-left-color: #64748b;
       }

       .layer-item.htl-layer {
           border-left-color: #d97706;
       }

       .layer-item.perovskite-layer {
           border-left-color: #dc2626;
       }

       .layer-item.etl-layer {
           border-left-color: #059669;
       }

       .layer-item.counter-electrode {
           border-left-color: #3b82f6;
       }

       .layer-color {
           width: 20px;
           height: 20px;
           border-radius: 4px;
           margin-right: 15px;
       }

       .layer-item.tco-layer .layer-color {
           background: #64748b;
       }

       .layer-item.htl-layer .layer-color {
           background: #d97706;
       }

       .layer-item.perovskite-layer .layer-color {
           background: #dc2626;
       }

       .layer-item.etl-layer .layer-color {
           background: #059669;
       }

       .layer-item.counter-electrode .layer-color {
           background: #3b82f6;
       }

       .layer-info h5 {
           font-size: 16px;
           font-weight: 600;
           color: #1f2937;
           margin-bottom: 4px;
       }

       .layer-info p {
           font-size: 14px;
           color: #6b7280;
       }

       /* Problem Visualization */
       .problem-visualization {
           display: flex;
           align-items: center;
           justify-content: center;
           flex-wrap: wrap;
           gap: 15px;
           padding: 20px;
           background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
           border-radius: 12px;
           margin: 15px 0;
       }

       .problem-step {
           display: flex;
           flex-direction: column;
           align-items: center;
           text-align: center;
           min-width: 120px;
       }

       .problem-content {
           background: white;
           padding: 15px;
           border-radius: 10px;
           box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
           border: 2px solid #fecaca;
           width: 100%;
       }

       .problem-icon {
           width: 50px;
           height: 50px;
           border-radius: 50%;
           display: flex;
           align-items: center;
           justify-content: center;
           margin: 0 auto 10px;
           box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
       }

       .problem-title {
           font-size: 14px;
           font-weight: 600;
           color: #1f2937;
           margin-bottom: 6px;
       }

       .problem-description {
           font-size: 12px;
           color: #6b7280;
           line-height: 1.3;
       }

       .problem-arrow {
           font-size: 20px;
           color: #dc2626;
           font-weight: bold;
           margin: 0 8px;
       }

       /* Impact Cards */
       .impact-cards {
           display: grid;
           grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
           gap: 15px;
           margin-top: 20px;
       }

       .impact-card {
           background: white;
           padding: 15px;
           border-radius: 10px;
           box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
           text-align: center;
           border: 2px solid #e5e7eb;
       }

       .impact-icon {
           width: 40px;
           height: 40px;
           border-radius: 50%;
           display: flex;
           align-items: center;
           justify-content: center;
           margin: 0 auto 10px;
           box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
       }

       .impact-title {
           font-size: 14px;
           font-weight: 600;
           color: #1f2937;
           margin-bottom: 6px;
       }

       .impact-description {
           font-size: 12px;
           color: #6b7280;
       }

       /* Tab Buttons for Materials Analysis */
       .tab-buttons {
           display: flex;
           flex-direction: column;
           gap: 0.5rem;
       }

       .tab-button {
           background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
           border: 2px solid #cbd5e1;
           border-radius: 0.5rem;
           padding: 0.75rem 1rem;
           cursor: pointer;
           transition: all 0.3s ease;
           font-weight: 500;
           color: #475569;
           box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
           display: flex;
           align-items: center;
           justify-content: flex-start;
           text-align: left;
           width: 100%;
       }

       .tab-button:hover {
           background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
           border-color: #94a3b8;
           transform: translateX(2px);
           box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
       }

       .tab-button.active {
           background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
           border-color: #1e40af;
           color: white;
           box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
           transform: translateX(4px);
       }

       /* Responsive adjustments */
       @media (max-width: 768px) {
           .simplified-process,
           .problem-visualization {
               flex-direction: column;
               gap: 15px;
           }
           
           .process-arrow,
           .problem-arrow {
               transform: rotate(90deg);
               margin: 10px 0;
           }
           
           .process-step,
           .problem-step {
               min-width: 100%;
           }
           
           .impact-cards {
               grid-template-columns: 1fr;
           }
       }