.library-header {
    background: linear-gradient(90deg, #4a90e2, #5cb85c);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 3rem;
}

.library-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 30%);
    transform: rotate(0deg);
    animation: rotate 20s linear infinite;
}

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

.library-header h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: none;
    border-radius: 0;
    position: relative;
    z-index: 2;
}

.content-section {
    background: linear-gradient(135deg, #F8F8FF 0%, #F0F8FF 50%, #F8F8FF 100%);
    border: 3px solid #8B4513;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 
        0 8px 25px rgba(0,0,0,0.15),
        inset 0 2px 8px rgba(255,255,255,0.3);
    margin-top: 2rem;
}

.content-section h2 {
    color: #4a90e2;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.content-section p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.feature-box {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #4a90e2;
}

.feature-box h3 {
    color: #4a90e2;
    margin-bottom: 1rem;
}

.feature-box ul {
    margin: 0;
    padding-left: 20px;
}

.feature-box li {
    margin-bottom: 0.5rem;
    color: #666;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

footer p {
    margin: 0;
    font-size: 1rem;
}

/* 3Dモデルギャラリー用 */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}
.model-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.10);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.model-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 32px rgba(74,144,226,0.16);
}
.model-thumb {
    width: 100%;
    height: 160px;
    object-fit: contain;
    background: #f8f8ff;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    margin-bottom: 0.5rem;
    display: block;
}
.model-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a237e;
    text-align: center;
    padding: 0.7rem 0 1.1rem 0;
    width: 100%;
    background: none;
}
@media (max-width: 600px) {
    .model-grid {
        gap: 1rem;
    }
    .model-thumb {
        height: 110px;
    }
    .model-title {
        font-size: 1rem;
        padding: 0.5rem 0 0.7rem 0;
    }
}

@media (max-width: 768px) {
    .library-header h1 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
}

/* 3Dビューアーモーダル */
.model-viewer-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.model-viewer-content {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    height: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.model-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(90deg, #4a90e2, #5cb85c);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.model-viewer-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.model-container {
    position: relative;
    width: 100%;
    height: calc(100% - 180px);
    background: #f0f0f0;
    overflow: hidden;
}

.model-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.loading-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
    color: #333;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.loading-message i {
    font-size: 1.5rem;
    color: #4a90e2;
}

.model-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.control-btn {
    background: linear-gradient(135deg, #4a90e2, #5cb85c);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.active {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.control-btn.active:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .model-viewer-content {
        width: 95%;
        height: 95%;
        margin: 2.5% auto;
    }
    
    .model-viewer-header {
        padding: 1rem 1.5rem;
    }
    
    .model-viewer-header h2 {
        font-size: 1.2rem;
    }
    
    .model-controls {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
        position: absolute;
        bottom: 0;
    }
    
    .control-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .loading-message {
        padding: 1.5rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .model-viewer-content {
        width: 98%;
        height: 98%;
        margin: 1% auto;
        border-radius: 15px;
    }
    
    .model-viewer-header {
        padding: 0.8rem 1rem;
    }
    
    .model-controls {
        gap: 0.5rem;
        position: absolute;
        bottom: 0;
        padding: 0.6rem 0.8rem;
    }
    
    .control-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        min-width: 80px;
    }
} 