/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
}

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

.nav-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
}

/* Главный контент */
.main-content {
    min-height: calc(100vh - 120px);
}

/* Hero секция */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2563eb;
}

.btn-telegram {
    background: #0088cc;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-telegram:hover {
    background: #006699;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.btn-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Features секция */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

/* Page header */
.page-header {
    background: #2563eb;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Telegram add section */
.telegram-add-section {
    padding: 30px 0;
    text-align: center;
    background: white;
}

/* About content */
.about-content {
    padding: 60px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.tech-list, .features-list {
    list-style: none;
    margin-bottom: 2rem;
}

.tech-list li, .features-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.tech-list li:last-child, .features-list li:last-child {
    border-bottom: none;
}

/* Info card */
.info-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.info-card h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.endpoint {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #2563eb;
}

.endpoint code {
    display: block;
    font-family: 'Monaco', 'Menlo', monospace;
    color: #2563eb;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.endpoint span {
    font-size: 0.9rem;
    color: #666;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    opacity: 0.8;
}

/* Stickers grid */
.stickers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.sticker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 160px;
    text-decoration: none;
    color: inherit;
}

.sticker-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    position: relative;
}

.sticker-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.sticker-text{
    text-align: center;
    margin-top: 0.5rem;
    width: 120px;
}

.sticker-text-title{
    font-weight: 500;
}

.sticker-text .muted{
    overflow:hidden;
}

.sticker-emoji {
    font-size: 1.2rem;
    text-align: center;
}

/* Модальное окно для увеличенного превью стикера */
.sticker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.sticker-modal.show {
    opacity: 1;
    visibility: visible;
}

.sticker-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.sticker-modal.show .sticker-modal-content {
    transform: scale(1);
}

.sticker-media-container {
    width: 512px;
    height: 512px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticker-media-container img,
.sticker-media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Для обратной совместимости */
.sticker-modal img {
    width: 512px;
    height: 512px;
    object-fit: contain;
    display: block;
}

.sticker-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.sticker-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Кнопки навигации в модальном окне */
.sticker-modal-nav {
    position: absolute;
    top: 60%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10001;
}

.sticker-modal-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.sticker-modal-nav-left {
    left: -60px;
}

.sticker-modal-nav-right {
    right: -60px;
}

.sticker-modal-nav svg {
    width: 24px;
    height: 24px;
}

.sticker-modal-emoji {
    margin-top: 1rem;
    font-size: 3rem;
    text-align: center;
}

.muted {
    color: #666;
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination-item {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    min-width: 40px;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    color: #2563eb;
    background: white;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-item:hover:not(.current):not(.ellipsis) {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.pagination-item.current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    cursor: default;
}

.pagination-item.ellipsis {
    background: transparent;
    border: none;
    color: #666;
    cursor: default;
}

.random-sets-section{
    padding-top:50px;
}
.random-sets-section h2{
    text-align: center;
}
/* Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .stickers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stickers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        max-width: none;
    }
    
    .sticker-image {
        width: 100px;
        height: 100px;
    }
}