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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #1f1f1f;
    --bg-card-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent: #6c5ce7;
    --accent-hover: #5f4fd8;
    --border: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 100%;
    padding: 20px 16px;
    padding-bottom: 40px;
}

header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 20px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.category-section {
    margin-bottom: 24px;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    padding-left: 4px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.photo-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: auto;
    position: relative;
    overflow: visible;
}

.photo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent)20, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.2);
}

.photo-card:hover::before {
    opacity: 1;
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 36px;
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-placeholder {
    transform: scale(1.1);
}

.photo-icon {
    display: block;
}

.photo-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.photo-description {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.photo-image {
    width: 100%;
    max-height: 200px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
    background: var(--bg-secondary);
}

.no-sessions,
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .photo-card {
        min-height: 160px;
        padding: 12px;
    }
    
    .photo-placeholder {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    header h1 {
        font-size: 24px;
    }
}

/* Анимация появления */
.photo-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.photo-card:nth-child(1) { animation-delay: 0.1s; }
.photo-card:nth-child(2) { animation-delay: 0.2s; }
.photo-card:nth-child(3) { animation-delay: 0.3s; }
.photo-card:nth-child(4) { animation-delay: 0.4s; }
.photo-card:nth-child(5) { animation-delay: 0.5s; }
.photo-card:nth-child(6) { animation-delay: 0.6s; }

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