* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7fafc;
    color: #2d3748;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 16px;
}

.nav-links a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background: #f7fafc;
    color: #2d3748;
    transform: translateY(-2px);
}

.nav-links a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 100px 20px 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="40" fill="white" opacity="0.03"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.cosplay-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.corporate-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.page-header h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.4em;
    opacity: 0.95;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* Gallery */
.gallery-container {
    max-width: 100%;
    margin: 0;
    padding: 60px 20px;
    background: linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
}

/* CSS Columns Masonry Layout - Pinterest Style */
.gallery-grid,
.gallery-masonry {
    display: block;
    column-count: 3;
    column-gap: 24px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

/* Legacy grid fallback (deprecated) */
.gallery-grid-legacy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-item,
figure {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    background: white;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 24px;
    width: 100%;
    display: block;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

.gallery-item:hover,
figure:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.gallery-item img,
figure img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover img,
figure:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6) 70%, transparent);
    color: white;
    padding: 24px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-overlay h3 {
    font-size: 1.1em;
    margin-bottom: 6px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-item-overlay p {
    font-size: 0.85em;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); }
    to { transform: translate(-50%, -50%) scale(1); }
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close:hover {
    color: #f5576c;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    padding: 20px;
    user-select: none;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

.caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 1.2em;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    max-width: 80%;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2em;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 16px 20px;
        gap: 16px;
    }

    .logo {
        font-size: 1.3em;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-links a {
        padding: 10px 16px;
        font-size: 0.9em;
    }

    .page-header {
        padding: 60px 20px 50px;
    }

    .page-header h1 {
        font-size: 2.2em;
    }

    .page-header p {
        font-size: 1.1em;
    }

    .gallery-container {
        padding: 40px 12px;
    }

    .gallery-grid,
    .gallery-masonry {
        column-count: 2;
        column-gap: 18px;
        padding: 0 8px;
    }

    .gallery-item,
    figure {
        border-radius: 12px;
        margin-bottom: 24px;
    }

    .close {
        top: 15px;
        right: 25px;
        font-size: 40px;
    }

    .prev, .next {
        font-size: 30px;
        padding: 10px;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .lightbox-content {
        max-width: 95%;
    }
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .gallery-grid,
    .gallery-masonry {
        column-count: 1;
        padding: 0 12px;
    }
}