/* style.css - Стили для сайта "Юмор по-русски!" */

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00ACC1;      /* Бирюзовый */
    --secondary-color: #26C6DA;    /* Светлая бирюза */
    --text-color: #333;
    --bg-color: #E0F7FA;           /* Светло-бирюзовый фон */
    --border-color: #B2EBF2;       /* Бирюзовая граница */
    --hover-color: #00838F;        /* Темная бирюза при наведении */
    --sidebar-bg: #FFF;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo-text h1 {
    font-size: 2.5em;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 0.9em;
    opacity: 0.9;
    font-style: italic;
}

/* Навигация */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.main-nav a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* Основной контент */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin: 30px auto;
}

/* Дата заголовок */
.date-header {
    background: white;
    padding: 15px 25px;
    border-left: 5px solid var(--primary-color);
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.date-header h2 {
    color: var(--primary-color);
    font-size: 1.5em;
}

/* Карточка анекдота */
.joke-item {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.joke-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.joke-text {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #222;
}

.joke-text p {
    margin-bottom: 10px;
}

/* Метаданные анекдота */
.joke-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: #666;
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vote-up,
.vote-down {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s;
}

.vote-up:hover {
    background: #28a745;
    transform: scale(1.1);
}

.vote-down:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.score {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
}

.author a {
    color: var(--primary-color);
    text-decoration: none;
}

.author a:hover {
    text-decoration: underline;
}

.share-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.share-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Пагинация */
.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 10px 15px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-color);
    color: white;
}

/* Сайдбар */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.auth-box,
.sidebar-section {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.auth-box h3,
.sidebar-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #555;
}

.form-group input {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255,107,0,0.3);
}

.forgot-password {
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9em;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Списки категорий */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.2s;
}

.category-list a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    padding-left: 20px;
}

/* Статистика */
.stats ul {
    list-style: none;
}

.stats li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stats li:last-child {
    border-bottom: none;
}

.stats strong {
    color: var(--primary-color);
}

/* Футер */
footer {
    background: #333;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
}

.footer-nav {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-nav a:hover {
    opacity: 1;
}

/* Адаптивность */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .logo-text h1 {
        font-size: 1.8em;
    }
    
    .main-nav ul {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .joke-meta {
        flex-wrap: wrap;
    }
    
    .logo-text h1 {
        font-size: 1.4em;
    }
    
    .main-nav a {
        padding: 10px 12px;
        font-size: 0.9
    }
    .main-nav a {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .container {
        padding: 0 15px;
    }
}

.joke { background: #fff; margin-bottom: 15px; padding: 10px 20px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.pagination { text-align: center; margin-top: 20px; }
.pagination a, .pagination span {
    display: inline-block; padding: 6px 12px; margin: 0 3px;
    border: 1px solid #ccc; border-radius: 4px;
    text-decoration: none; color: #333;
}
.pagination .active { background: #007bff; color: #fff; border-color: #007bff; }
.pagination a:hover { background: #eee; }