/* Gallery Styles */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Loader */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error State */
.error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

.error-content {
    text-align: center;
    max-width: 500px;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

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

.error-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.error-content p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Gallery Container */
#gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    color: var(--text-light);
}

.stat-icon {
    font-size: 1.5rem;
}

.gallery-owner {
    color: var(--text-light);
    font-size: 1rem;
}

.owner-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.owner-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
    align-items: start;
}

.image-card {
    position: relative;
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 3/4;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.image-date {
    color: var(--white);
    font-size: 0.875rem;
}

.btn-recreate {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-recreate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

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

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    margin: 4rem 0;
    box-shadow: var(--shadow-lg);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-main-text {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    font-weight: 400;
}

.cta-highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 1rem 2rem;
    border-radius: 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.highlight-icon {
    font-size: 1.75rem;
}

.cta-features {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    min-width: 180px;
    backdrop-filter: blur(5px);
}

.feature-icon {
    font-size: 2rem;
}

/* Buttons */
.btn-primary,
.btn-primary-large {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow);
}

.btn-primary-large {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
}

.btn-primary:hover,
.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Footer */
.gallery-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.gallery-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.gallery-footer a:hover {
    text-decoration: underline;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: var(--white);
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    transition: opacity 0.3s ease;
}

.lightbox-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}

.lightbox-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

/* Responsive */
/* Планшеты большие и средние */
@media (max-width: 1024px) {
    .images-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Планшеты маленькие и телефоны */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .cta-section {
        padding: 3rem 1.5rem;
    }
    
    .cta-section h2 {
        font-size: 1.75rem;
    }
    
    .cta-main-text {
        font-size: 1.125rem;
    }
    
    .cta-highlight {
        font-size: 1.075rem;
        padding: 0.875rem 1.5rem;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feature {
        min-width: auto;
        width: 100%;
        max-width: 300px;
    }
    
    .lightbox-nav button {
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .gallery-stats {
        gap: 1rem;
    }
    
    .gallery-header {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-icon {
        font-size: 3rem;
    }
}

