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

:root {
    --primary-color: #2c3e50;
    --accent-color: #1abc9c;
    --text-color: #2c3e50;
    --background-color: #ecf0f1;
    --card-background: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --overlay-color: rgba(0, 0, 0, 0.85);
    --button-hover: #16a085;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    background-image: 
        linear-gradient(45deg, #f1f1f1 25%, transparent 25%),
        linear-gradient(-45deg, #f1f1f1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f1f1f1 75%),
        linear-gradient(-45deg, transparent 75%, #f1f1f1 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

h1 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 3em;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* View Controls */
.view-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.view-toggle {
    padding: 0.8rem 1.5rem;
    border: none;
    background-color: var(--accent-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.view-toggle:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

.view-toggle:active::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 200%; height: 200%;
    background: rgba(52,152,219,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    animation: ripple 0.5s linear;
    z-index: 1;
}

@keyframes ripple {
    from { opacity: 1; transform: translate(-50%, -50%) scale(0.2); }
    to   { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.view-toggle.active {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 4px #1abc9c;
    color: #fff;
}

.view-toggle i {
    font-size: 1.1rem;
}

/* Gallery Styles */
.gallery {
    display: grid;
    gap: 2rem;
    padding: 1rem;
    min-height: 400px;
    transition: all 0.3s ease;
}

.gallery.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.gallery.single-view {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.gallery.single-view .gallery-item {
    aspect-ratio: 16/9;
    margin: 0 auto;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: visible;
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    aspect-ratio: 1;
    cursor: pointer;
    transform-origin: center;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: gallery-fade-in 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transition: box-shadow 0.4s, border 0.3s, filter 0.3s;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover {
    box-shadow: 0 0 0 6px rgba(26,188,156,0.10), 0 20px 40px rgba(26, 188, 156, 0.15), 0 8px 20px var(--shadow-color);
    border: 2px solid #1abc9c;
    filter: brightness(1.07) saturate(1.15);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    overflow: hidden;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    border-radius: 15px;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Add these new styles after the gallery-item styles and before the lightbox styles */

.like-container {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.like-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.like-button:hover {
    transform: scale(1.1);
}

.like-button.liked {
    color: #ff1493 !important;
    animation: like-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.like-button.liked i {
    color: #ff1493 !important;
}

.like-button i {
    transition: transform 0.3s ease;
}

.like-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    min-width: 20px;
}

@keyframes like-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Add hover effect for like container */
.gallery-item:hover .like-container {
    transform: translateY(-5px);
}

/* Adjust single view like container position */
.single-view .like-container {
    bottom: 30px;
    left: 30px;
    padding: 10px 15px;
}

.single-view .like-button {
    font-size: 1.5rem;
}

.single-view .like-count {
    font-size: 1.1rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .like-container {
        bottom: 10px;
        left: 10px;
        padding: 6px 10px;
    }

    .like-button {
        font-size: 1rem;
    }

    .like-count {
        font-size: 0.8rem;
    }

    /* Fix single image view on mobile */
    .gallery.single-view {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100vw;
        min-height: 60vh;
        margin: 0;
        padding: 0;
    }
    .gallery.single-view .gallery-item {
        aspect-ratio: unset;
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    .gallery.single-view .gallery-item img {
        width: 100vw;
        max-width: 100vw;
        height: auto;
        border-radius: 0;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }
}

/* Navigation Controls */
.navigation-controls {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1rem;
}

.single-view-active .navigation-controls {
    display: flex;
}

.nav-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: #1abc9c;
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 0 0 4px #1abc9c44;
}

.nav-btn:active {
    background-color: #ffec3d;
    color: #1abc9c;
    transform: scale(0.95) rotate(0deg);
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.image-counter {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, backdrop-filter 0.3s;
    backdrop-filter: blur(0px);
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    backdrop-filter: blur(6px);
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    animation: lightbox-zoom-in 0.4s cubic-bezier(0.23,1,0.32,1);
}

@keyframes lightbox-zoom-in {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* Hide navigation in grid view */
.grid-view ~ .navigation-controls {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .gallery.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 1.5rem;
    }

    .view-toggle {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }

    .container {
        padding: 0.8rem;
        border-radius: 15px;
    }

    .navigation-controls {
        gap: 1rem;
    }

    .image-counter {
        font-size: 0.9rem;
    }
}

/* --- Like Count Bounce Animation --- */
.like-count.bounce {
    animation: count-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes count-bounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* --- Confetti Particle Styles --- */
.confetti {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    width: 6px;
    height: 12px;
    border-radius: 2px;
    opacity: 0.8;
    will-change: transform, opacity;
}

@keyframes gallery-fade-in {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Card Shadow Glow on Hover --- */
@keyframes glow-pulse {
    from { box-shadow: 0 0 0 6px rgba(255,20,147,0.10), 0 20px 40px rgba(255, 20, 147, 0.15), 0 8px 20px var(--shadow-color); }
    to   { box-shadow: 0 0 16px 12px rgba(255,20,147,0.18), 0 20px 40px rgba(255, 20, 147, 0.15), 0 8px 20px var(--shadow-color); }
}

/* --- Tooltip for Like Button --- */
.like-button[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 120%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0.95;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.18);
}

/* --- Like Button Pulse if Not Liked --- */
.like-button.pulse:not(.liked) {
    animation: pulse-heart 1.2s infinite;
}
@keyframes pulse-heart {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

/* --- Staggered Gallery Item Fade-in --- */
.gallery.grid-view .gallery-item {
    animation-delay: var(--stagger-delay, 0ms);
}

@keyframes glow-pulse {
    from { box-shadow: 0 0 0 6px rgba(255,20,147,0.10), 0 20px 40px rgba(255, 20, 147, 0.15), 0 8px 20px var(--shadow-color); }
    to   { box-shadow: 0 0 16px 12px rgba(255,20,147,0.18), 0 20px 40px rgba(255, 20, 147, 0.15), 0 8px 20px var(--shadow-color); }
} 