/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent: #bb86fc;
    --accent-hover: #03dac6;
    --border: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
}

/* Home Page Hero */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--accent-hover);
    color: var(--bg-primary);
}

.btn-secondary:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Gallery Container */
.gallery-container {
    padding: 2rem;
}

.gallery-container h1 {
    text-align: center;
    margin-bottom: 3rem;
    color: #bb86fc;
    font-size: 2.5rem;
}

/* Subsections */
.subsection {
    margin-bottom: 4rem;
}

.subsection-title {
    font-size: 1.8rem;
    color: #03dac6;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #03dac6;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* Gallery Items */
.gallery-item {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(187, 134, 252, 0.3);
}

/* Thumbnails */
.thumbnail {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.thumbnail:hover {
    opacity: 0.9;
}

/* Model Placeholder (for 3D models without thumbnails) */
.model-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.model-placeholder:hover {
    background: linear-gradient(135deg, #2a2a2a 0%, #353535 100%);
}

.placeholder-icon {
    font-size: 4rem;
}

/* Item Names */
.item-name {
    padding: 1rem;
    text-align: center;
    font-size: 1rem;
    color: #e0e0e0;
    background-color: #252525;
}

/* No Content Message */
.no-content {
    text-align: center;
    color: #888;
    font-size: 1.2rem;
    margin-top: 3rem;
}

/* Lightbox for 2D Images */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    line-height: 1;
    user-select: none;
}

.lightbox-close:hover {
    color: #bb86fc;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-caption {
    color: #e0e0e0;
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
    margin-top: 1rem;
}

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

/* 3D Model Viewer Modal */
.model-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    line-height: 1;
    user-select: none;
}

.modal-close:hover {
    color: #bb86fc;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 8px;
    width: 85vw;
    max-width: 1000px;
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    color: #bb86fc;
    margin-bottom: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.modal-content model-viewer {
    flex: 1;
    min-height: 0;
    width: 100%;
    background-color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .subsection-title {
        font-size: 1.4rem;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .modal-content {
        padding: 1rem;
        width: 95vw;
        aspect-ratio: 1;
    }
}
