* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url('images/фон.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #0f0e11;
    font-family: 'Georgia', 'Times New Roman', 'Book Antiqua', serif;
    min-height: 100vh;
    color: #d9d4dd;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 14, 17, 0.7);
    z-index: 0;
}

body>* {
    position: relative;
    z-index: 1;
}

:root {
    --bg-card: rgba(22, 21, 26, 0.7);
    --border-light: #2b2733;
    --text-primary: #e0d9e8;
    --text-secondary: #9d91af;
    --accent-violet: #6d5b88;
    --accent-green: #6e8d5f;
    --glow-purple: rgba(109, 91, 136, 0.6);
}

.page-container {
    max-width: 950px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 1.5rem 2.5rem;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(60, 50, 80, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 1.8rem;
    backdrop-filter: blur(3px);
    animation: containerGlow 1.2s ease-out;
    min-height: 80vh;
}

@keyframes containerGlow {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid rgba(37, 34, 43, 0.8);
    padding-bottom: 0.9rem;
    transition: all 0.3s ease;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #d4c8e6;
    line-height: 1.1;
    transition: text-shadow 0.3s ease, transform 0.2s;
    display: inline-block;
}

.logo h1:hover {
    text-shadow: 0 0 8px rgba(212, 200, 230, 0.6);
    transform: scale(1.01);
}

.logo .accent-dot {
    color: #b38ed1;
    font-size: 2.8rem;
    transition: color 0.2s;
}

.logo .sub {
    font-size: 0.9rem;
    color: #9d91af;
    margin-top: 0.1rem;
    font-style: italic;
    letter-spacing: 0.4px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.author-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background-color: rgba(28, 26, 33, 0.6);
    padding: 0.5rem 1.3rem;
    border-radius: 2.5rem;
    color: #beb1d0;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid #342e3f;
    transition: all 0.25s ease;
}

.author-badge:hover {
    border-color: #8c79aa;
    background: rgba(40, 37, 48, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* --- Стили для страницы каналов --- */

.channels-intro {
    background-color: rgba(24, 23, 30, 0.7);
    border-radius: 1.2rem;
    padding: 1.2rem 1.8rem;
    border: 1px solid #8764a3;
    transition: all 0.25s ease;
    animation: gentleAppear 0.9s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    margin-bottom: 0.5rem;
}

.channels-intro:hover {
    border-color: #a97fc9;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
    background: rgba(30, 28, 38, 0.8);
}

.channels-intro h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #d4c8e6;
    margin-bottom: 0.3rem;
}

.channels-intro p {
    color: #b38ed1;
    font-size: 0.95rem;
    line-height: 1.5;
}

@keyframes gentleAppear {
    0% {
        opacity: 0;
        transform: scale(0.97);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.channels-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.3rem;
    flex: 1;
}

.channel-card {
    background-color: rgba(0, 0, 0, 0.55);
    border-radius: 1.1rem;
    padding: 1.2rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    border: 1px solid rgba(36, 33, 41, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.2);
    cursor: pointer;
    animation: cardFloatIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(12px);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.channel-card:hover {
    border-color: #a27fc9;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(170, 130, 200, 0.4);
    background-color: rgba(27, 26, 33, 0.92);
    transform: translateY(-5px);
}

.channel-card:active {
    transform: scale(0.98);
}

@keyframes cardFloatIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.channel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #b898e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    transition: all 0.3s ease;
    background-color: #2a2435;
}

.channel-card:hover .channel-avatar {
    border-color: #d4c8e6;
    box-shadow: 0 0 18px rgba(180, 150, 220, 0.5);
    transform: scale(1.08);
}

.channel-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d5b88, #4a3d5c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #d4c8e6;
    border: 2px solid #b898e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.channel-card:hover .channel-avatar-placeholder {
    border-color: #d4c8e6;
    box-shadow: 0 0 18px rgba(180, 150, 220, 0.5);
    transform: scale(1.08);
}

.channel-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.channel-name {
    font-size: 1.35rem;
    font-weight: 600;
    color: #d4c8e6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    flex-wrap: wrap;
}

.channel-card:hover .channel-name {
    color: #ecdfff;
}

.channel-handle {
    color: #9d91af;
    font-size: 0.85rem;
    font-weight: 400;
    background: rgba(33, 40, 27, 0.2);
    padding: 0.1rem 0.6rem;
    border-radius: 10px;
}

.channel-desc {
    color: #a997b8;
    font-size: 0.88rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.channel-card:hover .channel-desc {
    color: #c8b9e0;
}

.channel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.channel-tag {
    background-color: rgba(31, 28, 38, 0.7);
    color: #a997b8;
    padding: 0.15rem 0.7rem;
    border-radius: 12px;
    font-size: 0.7rem;
    border: 1px solid #2f2a39;
    font-weight: 500;
    transition: all 0.2s;
}

.channel-card:hover .channel-tag {
    background-color: rgba(80, 70, 100, 0.7);
    color: #e1ceff;
    border-color: #6a518a;
}

.channel-arrow {
    color: #6d5b88;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.channel-card:hover .channel-arrow {
    color: #b898e0;
    transform: translateX(4px);
}

/* --- Ссылка назад --- */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #9d91af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin-top: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    background: rgba(24, 23, 30, 0.4);
    border: 1px solid #342e3f;
    width: fit-content;
}

.back-link:hover {
    color: #d4c8e6;
    border-color: #8c79aa;
    background: rgba(40, 37, 48, 0.6);
    transform: translateX(-3px);
}

/* --- Ripple эффект --- */

.click-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 200, 230, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.5s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- Футер --- */

.footer-note {
    text-align: center;
    color: #5c4f6d;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    border-top: 1px solid rgba(34, 32, 42, 0.6);
    padding-top: 1.2rem;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.footer-note:hover {
    color: #9081a3;
}

/* --- Адаптивность --- */

@media (max-width: 550px) {
    .page-container {
        padding: 1.2rem;
    }
    .channel-card {
        padding: 1rem;
        gap: 0.9rem;
    }
    .channel-avatar,
    .channel-avatar-placeholder {
        width: 48px;
        height: 48px;
    }
    .channel-name {
        font-size: 1.15rem;
    }
    .logo h1 {
        font-size: 1.8rem;
    }
    .logo .accent-dot {
        font-size: 2rem;
    }
}