/*
 * static/css/style.css
 * Главный файл стилей для «ЯТИ»
 * Тёплый, бумажный, с душой
 */

/* ===== ОСНОВНЫЕ НАСТРОЙКИ ===== */
:root {
    --color-bg: #f5f2eb;        /* фон как старая бумага */
    --color-text: #2b241e;       /* тёмно-коричневый текст */
    --color-text-light: #6b5843; /* приглушённый */
    --color-accent: #b0987a;     /* тёплый акцент */
    --color-border: #d4c3b2;     /* мягкая граница */
    --color-card: #fff8f2;       /* карточки */
    --color-hover: #e3d9cf;      /* при наведении */
    --shadow: 0 4px 12px rgba(90, 60, 30, 0.08);
    
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', 'Times New Roman', serif;
    
    --radius: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(200, 180, 150, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(150, 120, 90, 0.05) 0%, transparent 40%);
}

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-accent);
}

a:hover {
    border-bottom: 1px solid var(--color-text);
}

/* ===== БУКВА ЯТЬ ===== */
.yat-letter {
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--color-accent);
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s;
}

.yat-letter:hover {
    transform: rotate(2deg) scale(1.05);
}

/* ===== КОНТЕЙНЕРЫ ===== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(90, 60, 30, 0.12);
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    background: rgba(255, 248, 242, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-family: var(--font-serif);
    border: none;
}

.navbar-logo:hover {
    border: none;
    opacity: 0.8;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    border: none;
    color: var(--color-text-light);
}

.navbar-menu a:hover {
    color: var(--color-text);
    border: none;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ===== ФОРМЫ ===== */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

input, textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 2rem;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(176, 152, 122, 0.1);
}

textarea {
    border-radius: 1.5rem;
    min-height: 120px;
    resize: vertical;
}

button, .button {
    background: var(--color-text);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 3rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--color-text);
}

button:hover, .button:hover {
    background: transparent;
    color: var(--color-text);
}

button.secondary, .button.secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

button.secondary:hover {
    background: var(--color-hover);
    border-color: var(--color-accent);
}

/* ===== СЛОВО (ПОСТ) ===== */
.slovo-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
}

.slovo-card:hover {
    border-color: var(--color-accent);
}

.slovo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.slovo-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--color-text);
}

.slovo-author {
    flex: 1;
}

.slovo-author-name {
    font-weight: 600;
    margin-right: 0.5rem;
}

.slovo-author-username {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.slovo-time {
    color: var(--color-text-light);
    font-size: 0.8rem;
}

.slovo-content {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.slovo-content a {
    color: var(--color-accent);
    border: none;
}

.slovo-actions {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.slovo-action {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    font-size: 0.9rem;
}

.slovo-action:hover {
    color: var(--color-text);
    border: none;
}

.slovo-action.active {
    color: #c44b4b;
}

.slovo-action.active .slovo-icon {
    fill: currentColor;
}

.slovo-icon {
    width: 20px;
    height: 20px;
}

/* ===== ЛЕНТА ===== */
.feed {
    margin-top: 2rem;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.feed-tabs {
    display: flex;
    gap: 1rem;
}

.feed-tab {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    cursor: pointer;
}

.feed-tab.active {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

/* ===== ПРОФИЛЬ ===== */
.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 3rem;
}

.profile-info {
    flex: 1;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-serif);
}

.profile-stat-label {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* ===== ЗАГРУЗЧИК ===== */
.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-text);
    color: white;
    padding: 1rem 2rem;
    border-radius: 3rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 600px) {
    .navbar-menu {
        gap: 1rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .slovo-actions {
        gap: 1rem;
    }
}