/* Шапка */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.main-nav a.active,
.main-nav a:hover {
    background: #007bff;
    color: white;
}

.logout-btn {
    background: #ff6b6b;
    color: white !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Мобильное меню */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 999;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu a {
    padding: 12px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
}

/* Подвал */
.site-footer {
    background: #2c3e50;
    color: white;
    margin-top: 50px;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 14px;
}

/* Форма авторизации */
.auth-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 30px;
}

.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #0056b3;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
}

/* Страница мема */
.meme-full {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.meme-image-container {
    text-align: center;
    margin: 20px 0;
}

.meme-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.meme-description {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.meme-description h3 {
    margin-bottom: 10px;
}

.memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.meme-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.meme-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.meme-card h4 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

/* Адаптивность */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
    }
    
    .container {
        padding: 15px;
    }
    
    .sidebar {
        order: 2;
        width: 100%;
    }
    
    .main-content {
        order: 1;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .memes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .memes-grid {
        grid-template-columns: 1fr;
    }
    
    .meme-card img {
        height: 200px;
    }
    
    .joke-item,
    .meme-full {
        padding: 15px;
    }
}

/* Страницы с контентом (правила, политика) */
.content-page {
    background: white;
    padding: 30px;
    border-radius: 12px;
    line-height: 1.8;
}

.content-page h1 {
    margin-bottom: 30px;
    color: #2c3e50;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.content-page section {
    margin-bottom: 30px;
}

.content-page h2 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 20px;
}

.content-page ul {
    padding-left: 20px;
    margin: 15px 0;
}

.content-page li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 10px;
}

.content-page li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: -10px;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid #3498db;
}

/* Формы */
.terms {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.terms label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.terms input[type="checkbox"] {
    width: auto;
    margin-top: 5px;
}

/* Сообщения */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

/* reCAPTCHA */
.g-recaptcha {
    margin: 15px 0;
}

/* Адаптивность для длинных страниц */
@media (max-width: 768px) {
    .content-page {
        padding: 20px;
    }
    
    .content-page h1 {
        font-size: 24px;
    }
    
    .content-page h2 {
        font-size: 18px;
    }
}
/* Стили для кнопки лайка */
.like-btn { 
    background: none; 
    border: 1px solid #ddd; 
    padding: 5px 10px; 
    border-radius: 15px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    color: #777; 
    font-size: 14px; 
    transition: all 0.2s;
}
.like-btn:hover { 
    border-color: #ff4757; 
    color: #ff4757; 
}
.like-btn.liked { 
    border-color: #ff4757; 
    color: #ff4757; 
}
.like-btn i { 
    font-size: 14px; 
}
.like-btn.liked i { 
    color: #ff4757; 
}

/* Анимация для лайка */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.like-btn.liked i {
    animation: heartBeat 0.3s ease-in-out;
}
