/*
Theme Name: Habr Style
Theme URI: http://185.90.61.174
Description: ArtColor — мир раскрасок и творчества
Version: 3.0
Author: Custom
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #ff6b6b;
    --primary-dark: #ee5a24;
    --secondary: #5f27cd;
    --accent: #feca57;
    --accent2: #48dbfb;
    --green: #1dd1a1;
    --dark: #222f3e;
    --text: #3d3d3d;
    --light: #f8f9fc;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.08);
    --card-hover: 0 12px 35px rgba(0,0,0,0.15);
    --rainbow: linear-gradient(135deg, #ff6b6b, #feca57, #1dd1a1, #48dbfb, #5f27cd, #ff6b6b);
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: all 0.25s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* === Rainbow Divider === */
.rainbow-line {
    height: 4px;
    background: var(--rainbow);
    background-size: 300% 100%;
    animation: rainbow-shift 4s linear infinite;
}
@keyframes rainbow-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* === Top Bar === */
.top-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* === Header === */
.site-header {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    height: 68px;
    gap: 14px;
}
.site-logo { flex-shrink: 0; }
.site-logo a {
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-mark {
    width: 68px; height: 68px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(255,107,107,0.05), rgba(168,85,247,0.05));
    border-radius: 20px;
    position: relative;
    transition: transform 0.5s cubic-bezier(.4,0,.2,1), box-shadow 0.5s, border-color 0.5s;
    border: 2px solid transparent;
}
.logo-mark svg {
    width: 60px; height: 60px;
}
.site-logo a:hover .logo-mark {
    transform: rotate(-8deg) scale(1.1);
    box-shadow: 0 8px 32px rgba(168,85,247,0.25), 0 0 0 3px rgba(168,85,247,0.1);
    border-color: rgba(168,85,247,0.15);
}
.site-logo a:hover .logo-mark svg .sparkles circle,
.site-logo a:hover .logo-mark svg .sparkles path {
    animation-duration: 0.5s !important;
}
.site-logo .logo-text { line-height: 1.1; }
.site-logo .logo-name {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -0.5px;
    display: block;
}
.logo-art {
    background: linear-gradient(135deg, #ff6b6b, #ff9a56, #ee5a24);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
    animation: logo-shimmer 4s ease infinite;
}
.logo-color {
    background: linear-gradient(135deg, #6c5ce7, #a855f7, #48dbfb);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logo-shimmer 4s ease infinite;
    animation-delay: 0.5s;
}
@keyframes logo-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.site-logo .logo-sub {
    font-size: 11px; font-weight: 700; color: #aaa;
    display: block; letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 3px;
    background: linear-gradient(90deg, #999, #bbb, #999);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sub-shimmer 6s linear infinite;
}
@keyframes sub-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.header-nav {
    display: flex; gap: 5px; list-style: none; align-items: center; flex-wrap: nowrap;
}
.header-nav > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    color: #fff !important;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    padding: 0 12px;
    height: 36px;
    border-radius: 18px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #5f27cd);
    background-size: 300% 300%;
    animation: fortune-gradient 4s ease infinite;
    box-shadow: 0 3px 12px rgba(102,126,234,0.3);
}
.header-nav > li > a:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
    color: #fff !important;
}
.header-nav > li > a::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: fortune-shine 4s ease-in-out infinite;
    pointer-events: none;
}
.header-nav > li.current-menu-item > a,
.header-nav > li.current-cat > a {
    background: linear-gradient(135deg, #f5576c, #ff9a9e, #feca57, #1dd1a1, #48dbfb, #5f27cd);
    background-size: 300% 300%;
    animation: fortune-gradient 3s ease infinite;
    box-shadow: 0 3px 14px rgba(245,87,108,0.4);
}

.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.header-search { position: relative; }

/* Search toggle button (icon only) */
.search-toggle-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid #eee;
    background: #f5f5f7;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.search-toggle-btn:hover {
    border-color: var(--primary);
    background: #fff;
    transform: scale(1.1);
}

/* Expanded search overlay */
.search-expand {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    padding: 4px;
    z-index: 9999;
    animation: searchExpand 0.3s ease;
}
.header-search.open {
    z-index: 9999;
}
.header-search.open .search-expand {
    display: flex;
}
.header-search.open .search-toggle-btn {
    display: none;
}
.search-expand form {
    display: flex;
    align-items: center;
}
.search-expand input {
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 14px;
    width: 280px;
    background: transparent;
    font-family: inherit;
}
.search-submit-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.search-submit-btn:hover {
    transform: scale(1.1);
}
.search-close-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s;
}
.search-close-btn:hover {
    background: #e0e0e0;
    color: #333;
}
@keyframes searchExpand {
    from { opacity: 0; transform: translateY(-50%) scaleX(0.5); }
    to { opacity: 1; transform: translateY(-50%) scaleX(1); }
}

.header-user { display: flex; align-items: center; gap: 10px; }
.user-link {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    white-space: nowrap;
    color: #fff !important; font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.4px;
    padding: 0 12px; height: 36px; border-radius: 18px;
    background: linear-gradient(135deg, #11998e, #38ef7d, #48dbfb, #667eea);
    background-size: 300% 300%;
    animation: fortune-gradient 5s ease infinite;
    box-shadow: 0 3px 12px rgba(17,153,142,0.3);
    transition: all 0.3s;
    position: relative; overflow: hidden;
}
.user-link:hover {
    color: #fff !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(17,153,142,0.4);
}
.user-link::before {
    content: '';
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: fortune-shine 4s ease-in-out infinite;
    pointer-events: none;
}
.user-link img { border-radius: 50%; border: 2px solid rgba(255,255,255,0.6); }
.user-link {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-btn {
    background: linear-gradient(135deg, #f5576c, #ff9a9e, #feca57, #1dd1a1);
    background-size: 300% 300%;
    animation: fortune-gradient 3s ease infinite;
    color: #fff !important; padding: 0 14px; height: 38px; border-radius: 19px;
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.4px;
    box-shadow: 0 3px 12px rgba(245,87,108,0.3);
    transition: all 0.3s;
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    white-space: nowrap;
}
.user-btn::before {
    content: '';
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: fortune-shine 4s ease-in-out infinite;
    pointer-events: none;
}
.user-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245,87,108,0.4);
}

/* Fortune Wheel Button */
.fortune-wheel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    white-space: nowrap;
    background: linear-gradient(135deg, #f5576c, #ff9a9e, #feca57, #1dd1a1, #48dbfb, #5f27cd);
    background-size: 300% 300%;
    animation: fortune-gradient 3s ease infinite;
    color: #fff !important;
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 3px 12px rgba(245,87,108,0.3);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.fortune-text { display: none; }
@keyframes fortune-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.fortune-wheel-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245,87,108,0.4);
    color: #fff !important;
}
.fortune-icon {
    font-size: 16px;
    animation: fortune-spin 4s ease-in-out infinite;
    display: inline-block;
}
@keyframes fortune-spin {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(360deg); }
    100% { transform: rotate(360deg); }
}
.fortune-wheel-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: fortune-shine 3s ease-in-out infinite;
    pointer-events: none;
}
@keyframes fortune-shine {
    0%, 100% { opacity: 0; transform: translate(-30%, -30%); }
    50% { opacity: 1; transform: translate(30%, 30%); }
}

/* === Hero === */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 60%, #f5576c 100%);
    color: #fff;
    padding: 60px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: hero-glow 6s ease-in-out infinite;
}
@keyframes hero-glow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}
.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.hero-banner h1 {
    font-size: 42px; font-weight: 900; margin-bottom: 14px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.hero-banner p {
    font-size: 18px; opacity: 0.9; font-weight: 600;
}
.hero-features {
    display: flex; justify-content: center; gap: 30px;
    margin-top: 28px;
}
.hero-feature {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 18px; border-radius: 25px;
}
.hero-feature-icon { font-size: 20px; }

/* === Layout === */
.site-content {
    max-width: 1600px; margin: 0 auto 40px; padding: 0 28px;
}
.content-with-sidebar { display: flex; gap: 30px; }
.content-main { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* === Section === */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.section-title {
    font-size: 24px; font-weight: 900; color: var(--dark);
    position: relative; padding-left: 16px;
}
.section-title::before {
    content: ''; position: absolute; left: 0; top: 4px;
    width: 5px; height: 70%; border-radius: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

/* === Category Tabs === */
.cat-tabs {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.cat-tab {
    padding: 6px 16px; border-radius: 20px;
    font-size: 13px; font-weight: 700;
    background: #fff; color: #888;
    border: 2px solid #eee;
    transition: all 0.25s; cursor: pointer;
}
.cat-tab:hover, .cat-tab.active {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px; margin-bottom: 36px;
}

/* === Product Card === */
.product-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex; flex-direction: column;
    position: relative;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover);
}
.product-card::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--green), var(--accent2), var(--secondary));
    opacity: 0; transition: opacity 0.3s;
}
.product-card:hover::after { opacity: 1; }

.product-image {
    position: relative; padding-top: 125%; overflow: hidden;
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
}
.product-image .placeholder-art {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); font-size: 72px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.4s;
}
.product-card:hover .placeholder-art {
    transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
}
.product-image img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s;
}
.product-card:hover .product-image img { transform: scale(1.08); }

/* Category gradients */
.cat-animals .product-image { background: linear-gradient(135deg, #96fbc4, #f9f586); }
.cat-flowers .product-image { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.cat-mandala .product-image { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.cat-nature .product-image { background: linear-gradient(135deg, #89f7fe, #66a6ff); }
.cat-art .product-image { background: linear-gradient(135deg, #ffd89b, #f7797d); }
.cat-fairy .product-image { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.cat-default .product-image { background: linear-gradient(135deg, #e0c3fc, #8ec5fc); }

.product-badge {
    position: absolute; top: 12px; left: 12px;
    color: #fff; padding: 4px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.badge-new { background: linear-gradient(135deg, #1dd1a1, #10ac84); }
.badge-popular { background: linear-gradient(135deg, #feca57, #ff9f43); }
.badge-series { background: linear-gradient(135deg, #a55eea, #8854d0); }

.product-info {
    padding: 16px 18px; flex: 1;
    display: flex; flex-direction: column;
}
.product-category {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 800; margin-bottom: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.product-title {
    font-size: 15px; font-weight: 800;
    color: var(--dark); margin-bottom: 6px; line-height: 1.3;
}
.product-title a { color: var(--dark); }
.product-title a:hover { color: var(--primary); }
.product-desc {
    font-size: 13px; color: #999; line-height: 1.5;
    margin-bottom: 12px; flex: 1;
}
.product-meta {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; border-top: 2px solid #f5f5f5;
}
.product-issue { font-size: 12px; color: #bbb; font-weight: 600; }
.product-price {
    font-size: 18px; font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Article Card === */
.article-card {
    background: #fff; border-radius: 16px;
    padding: 24px 28px; margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}
.article-meta {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 10px; font-size: 13px; color: #aaa; font-weight: 600;
}
.article-author { color: var(--secondary); }
.article-title {
    font-size: 22px; font-weight: 800;
    line-height: 1.3; margin-bottom: 10px;
}
.article-title a { color: var(--dark); }
.article-title a:hover { color: var(--primary); }
.article-hubs {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.article-hub {
    background: linear-gradient(135deg, rgba(255,107,107,0.1), rgba(95,39,205,0.1));
    color: var(--secondary); padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
}
.article-excerpt {
    color: #777; font-size: 15px;
    line-height: 1.65; margin-bottom: 16px;
}
.article-thumbnail { margin-bottom: 14px; border-radius: 12px; overflow: hidden; }
.article-footer {
    display: flex; align-items: center; gap: 20px;
    font-size: 13px; color: #bbb; font-weight: 600;
    border-top: 2px solid #f5f5f5; padding-top: 12px;
}
.article-stat { display: flex; align-items: center; gap: 5px; }

/* === Sidebar === */
.sidebar-block {
    background: #fff; border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 22px; margin-bottom: 20px;
    overflow: hidden;
}
.sidebar-title {
    font-size: 15px; font-weight: 800; color: var(--dark);
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--secondary)) 1;
}
.sidebar-list { list-style: none; }
.sidebar-list li {
    padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: #555; font-weight: 600; }
.sidebar-list a:hover { color: var(--primary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    background: #f5f5f7; color: #777;
    padding: 6px 14px; border-radius: 25px;
    font-size: 13px; font-weight: 700;
    transition: all 0.25s; border: 2px solid transparent;
}
.tag-cloud a:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

/* === Single Post === */
.single-post-content {
    background: #fff; border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 40px 48px;
}
.single-post-content h1 {
    font-size: 32px; font-weight: 900;
    line-height: 1.3; margin-bottom: 16px; color: var(--dark);
}
.single-post-content .entry-content {
    font-size: 16px; line-height: 1.85; color: #555;
}
.single-post-content .entry-content h2 {
    font-size: 22px; margin: 32px 0 14px; font-weight: 800;
    color: var(--dark); padding-left: 16px; position: relative;
}
.single-post-content .entry-content h2::before {
    content: ''; position: absolute; left: 0; top: 4px;
    width: 4px; height: 70%; border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.single-post-content .entry-content h3 {
    font-size: 19px; margin: 24px 0 12px; font-weight: 700; color: var(--dark);
}
.single-post-content .entry-content p { margin-bottom: 18px; }
.single-post-content .entry-content blockquote {
    border-left: 4px solid var(--primary); padding: 18px 24px;
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(255,107,107,0.05), rgba(95,39,205,0.05));
    border-radius: 0 12px 12px 0; color: #666; font-style: italic;
    font-weight: 600;
}
.single-post-content .entry-content ul,
.single-post-content .entry-content ol { margin: 12px 0 18px 24px; }
.single-post-content .entry-content li { margin-bottom: 8px; }
.single-post-content .entry-content pre,
.single-post-content .entry-content code {
    background: #f5f5f7; border-radius: 8px;
    font-family: 'SF Mono', Consolas, monospace; font-size: 14px;
}
.single-post-content .entry-content pre {
    padding: 18px; overflow-x: auto; margin-bottom: 16px;
}

/* === Comments === */
.comments-section {
    background: #fff; border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 24px 28px; margin-top: 20px;
}
.comments-section h2 { font-size: 18px; margin-bottom: 20px; color: var(--dark); font-weight: 800; }

/* === Footer === */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding: 50px 0 24px; margin-top: 0;
    position: relative;
}
.site-footer::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--rainbow);
    background-size: 300% 100%;
    animation: rainbow-shift 4s linear infinite;
}
.footer-inner {
    max-width: 1600px; margin: 0 auto 32px;
    padding: 0 28px;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
}
.footer-col h4 {
    color: #fff; font-size: 16px; margin-bottom: 16px; font-weight: 800;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
    color: rgba(255,255,255,0.6); font-size: 14px; font-weight: 600;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: 14px; line-height: 1.7; }
.footer-logo {
    font-size: 28px; font-weight: 900; margin-bottom: 12px; letter-spacing: -0.5px;
}
.footer-logo .logo-art {
    background: linear-gradient(135deg, #ff6b6b, #ff9a56);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; font-style: italic;
}
.footer-logo .logo-color {
    background: linear-gradient(135deg, #6c5ce7, #48dbfb);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-socials {
    display: flex; gap: 10px; margin-top: 16px;
}
.footer-social-btn {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.footer-social-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}
.footer-col-contacts a {
    display: flex; align-items: center; gap: 6px;
}
.footer-bottom {
    text-align: center; border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 28px 0; font-size: 13px;
    max-width: 1600px; margin: 0 auto;
}

/* === Pagination === */
.pagination {
    display: flex; justify-content: center; gap: 8px; margin: 30px 0;
}
.pagination a, .pagination .current {
    padding: 10px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 700;
}
.pagination a {
    background: #fff; border: 2px solid #eee; color: #666;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.pagination a:hover {
    border-color: var(--primary); color: var(--primary);
    box-shadow: 0 4px 12px rgba(255,107,107,0.2);
}
.pagination .current {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border: none;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

/* === Auth Pages === */
.auth-container { max-width: 460px; margin: 50px auto; padding: 0 24px; }
.auth-card {
    background: #fff; border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 40px 44px;
    position: relative; overflow: hidden;
}
.auth-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--green), var(--accent2), var(--secondary));
}
.auth-title {
    font-size: 28px; font-weight: 900; color: var(--dark); margin-bottom: 6px;
}
.auth-subtitle { font-size: 14px; color: #aaa; margin-bottom: 28px; font-weight: 600; }
.auth-form .form-group { margin-bottom: 20px; }
.auth-form label {
    display: block; font-size: 13px; font-weight: 700;
    color: #666; margin-bottom: 6px; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea {
    width: 100%; padding: 12px 16px;
    border: 2px solid #eee; border-radius: 12px;
    font-size: 15px; outline: none;
    transition: all 0.25s; font-family: inherit;
    background: #f9f9fb;
}
.auth-form input:focus,
.auth-form textarea:focus {
    border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 4px rgba(255,107,107,0.1);
}
.auth-form textarea { resize: vertical; }
.form-hint { font-size: 12px; color: #bbb; margin-top: 4px; display: block; }
.form-row { display: flex; justify-content: space-between; align-items: center; }
.checkbox-label {
    display: flex !important; align-items: center; gap: 6px;
    font-weight: 600 !important; cursor: pointer;
}
.checkbox-label input[type="checkbox"] { width: auto; }
.form-link { font-size: 13px; color: var(--secondary); font-weight: 700; }
.auth-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border: none; border-radius: 12px;
    font-size: 16px; font-weight: 800; font-family: inherit;
    cursor: pointer; transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    margin-top: 6px;
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}
.auth-footer {
    text-align: center; margin-top: 24px;
    font-size: 14px; color: #aaa; font-weight: 600;
    padding-top: 20px; border-top: 2px solid #f5f5f5;
}
.auth-footer a { color: var(--primary); font-weight: 800; }
.auth-message {
    padding: 14px 18px; border-radius: 12px;
    margin-bottom: 20px; font-size: 14px; font-weight: 700;
}
.auth-error {
    background: linear-gradient(135deg, rgba(255,107,107,0.1), rgba(238,90,36,0.1));
    color: var(--primary-dark);
}
.auth-success {
    background: linear-gradient(135deg, rgba(29,209,161,0.1), rgba(16,172,132,0.1));
    color: #10ac84;
}

/* === Cabinet === */
.cabinet-container {
    display: flex; gap: 30px;
    max-width: 1100px; margin: 30px auto; padding: 0 24px;
}
.cabinet-sidebar { width: 260px; flex-shrink: 0; }
.cabinet-main { flex: 1; min-width: 0; }

.cabinet-user-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    padding: 28px; text-align: center;
    margin-bottom: 16px; color: #fff;
    box-shadow: 0 8px 25px rgba(95,39,205,0.25);
}
.cabinet-avatar { margin-bottom: 12px; }
.cabinet-avatar img { border-radius: 50%; border: 3px solid rgba(255,255,255,0.4); }
.cabinet-user-name { font-size: 18px; font-weight: 800; }
.cabinet-user-role {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    opacity: 0.75; margin-top: 4px;
}

.cabinet-nav {
    background: #fff; border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.cabinet-nav-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 22px; color: #666;
    font-size: 14px; font-weight: 700;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s;
}
.cabinet-nav-item:last-child { border-bottom: none; }
.cabinet-nav-item:hover { background: #fafafa; color: var(--primary); }
.cabinet-nav-item.active {
    background: linear-gradient(135deg, rgba(255,107,107,0.08), rgba(95,39,205,0.08));
    color: var(--secondary); border-left: 4px solid var(--secondary);
}
.cabinet-nav-item.nav-logout { color: #bbb; }
.cabinet-nav-item.nav-logout:hover { color: var(--primary); }
.nav-count {
    background: #f0f0f0; color: #aaa;
    padding: 2px 10px; border-radius: 12px; font-size: 12px;
}

.cabinet-section {
    background: #fff; border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 32px 36px;
}
.cabinet-section-title {
    font-size: 22px; font-weight: 900;
    color: var(--dark); margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--secondary)) 1;
}

.profile-info-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.profile-info-item {
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8f9fc, #f0f2f8);
    border-radius: 12px;
}
.profile-label {
    display: block; font-size: 11px; color: #aaa;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 4px; font-weight: 700;
}
.profile-value { font-size: 15px; font-weight: 800; color: var(--dark); }
.cabinet-empty { text-align: center; padding: 40px; color: #bbb; font-weight: 600; }

/* Comments in cabinet */
.comments-list .comment-item {
    padding: 14px 0; border-bottom: 1px solid #f5f5f5;
}
.comments-list .comment-item:last-child { border-bottom: none; }
.comment-item-meta {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 6px;
}
.comment-item-meta a { color: var(--secondary); font-weight: 700; font-size: 14px; }
.comment-item-date { font-size: 12px; color: #bbb; }
.comment-item-text { font-size: 14px; color: #777; line-height: 1.5; }

/* ============================================
   Mega Dropdown Navigation
   ============================================ */
.main-nav { display: flex; align-items: center; flex: 1; min-width: 0; }

.has-dropdown { position: relative; }
.has-dropdown > a { display: flex; align-items: center; gap: 4px; }
.nav-arrow {
    font-size: 10px; transition: transform 0.3s;
    margin-left: 2px; opacity: 0.5;
}
.has-dropdown:hover .nav-arrow { transform: rotate(180deg); opacity: 1; }

/* Dropdown - hidden by default */
.mega-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Bridge element to prevent gap */
.has-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 16px;
}

/* Show on hover AND click */
.has-dropdown:hover > .mega-dropdown,
.has-dropdown.dropdown-open > .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

/* Active toggle color */
.has-dropdown:hover > a,
.has-dropdown.dropdown-open > a {
    color: #fff !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245,87,108,0.4) !important;
}

.dropdown-inner {
    display: flex;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
    overflow: hidden;
    min-width: 680px;
}

/* Top arrow */
.mega-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px; height: 14px;
    background: #fff;
    box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
    border-radius: 2px;
    z-index: 1;
}

.dropdown-col {
    padding: 24px 28px;
    flex: 1;
    min-width: 200px;
}
.dropdown-col + .dropdown-col {
    border-left: 1px solid #f3f3f5;
}

.dropdown-heading {
    font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: #bbb; margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5f5f7;
    display: flex; align-items: center; gap: 6px;
}

.dropdown-list { list-style: none; margin: 0; padding: 0; }
.dropdown-list li a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    color: #555; font-size: 14px; font-weight: 700;
    border-radius: 10px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    margin: 2px 0;
}
.dropdown-list li a:hover {
    background: linear-gradient(90deg, rgba(255,107,107,0.06), rgba(95,39,205,0.04));
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 18px;
}

.dd-icon {
    font-size: 18px; flex-shrink: 0;
    width: 24px; text-align: center;
    transition: transform 0.3s;
}
.dropdown-list li a:hover .dd-icon { transform: scale(1.25) rotate(5deg); }

.dd-count {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(255,107,107,0.1), rgba(95,39,205,0.1));
    color: var(--secondary);
    padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 800;
}

/* Promo card */
.dropdown-promo {
    padding: 0; border-left: none !important;
    width: 220px; flex-shrink: 0; flex-grow: 0;
}
.dropdown-promo-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; padding: 28px 24px;
    height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    position: relative; overflow: hidden;
}
.dropdown-promo-card::before {
    content: '';
    position: absolute; top: -30%; right: -30%;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
}
.dropdown-promo-card .promo-icon {
    font-size: 42px; margin-bottom: 10px;
    position: relative; z-index: 1;
    animation: promo-float 3s ease-in-out infinite;
}
@keyframes promo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.dropdown-promo-card h4 {
    font-size: 16px; font-weight: 900; margin-bottom: 6px;
    position: relative; z-index: 1;
}
.dropdown-promo-card p {
    font-size: 12px; opacity: 0.85; line-height: 1.5;
    margin-bottom: 14px; position: relative; z-index: 1;
}
.promo-btn {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff !important;
    padding: 8px 20px; border-radius: 20px;
    font-size: 12px; font-weight: 800;
    transition: all 0.25s;
    position: relative; z-index: 1;
    border: 1px solid rgba(255,255,255,0.3);
}
.promo-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}

/* Mobile menu button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column; gap: 5px;
    background: none; border: none;
    cursor: pointer; padding: 8px; z-index: 200;
}
.mobile-menu-toggle span {
    width: 24px; height: 3px;
    background: var(--dark); border-radius: 2px;
    transition: all 0.3s;
}

/* ============================================
   Sidebar Widgets (Gutenberg blocks)
   ============================================ */
.sidebar .sidebar-block {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 0;
    margin-bottom: 22px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.04);
}
.sidebar .sidebar-block:hover {
    box-shadow: var(--card-hover);
    transform: translateY(-2px);
}

/* Widget titles */
.sidebar .sidebar-block h2,
.sidebar .sidebar-block .wp-block-heading {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 !important;
    padding: 16px 22px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-text-fill-color: #fff;
}

/* Search widget */
.sidebar .sidebar-block .wp-block-search__label { display: none !important; }
.sidebar .sidebar-block .wp-block-search,
.sidebar .sidebar-block form[role="search"] {
    padding: 20px 22px;
}
.sidebar .sidebar-block .wp-block-search__inside-wrapper {
    display: flex; gap: 0;
}
.sidebar .sidebar-block .wp-block-search__input,
.sidebar .sidebar-block input[type="search"] {
    flex: 1;
    border: 2px solid #eee;
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    outline: none;
    background: #f8f9fc;
    transition: all 0.25s;
}
.sidebar .sidebar-block .wp-block-search__input:focus,
.sidebar .sidebar-block input[type="search"]:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}
.sidebar .sidebar-block .wp-block-search__button,
.sidebar .sidebar-block input[type="submit"],
.sidebar .sidebar-block button[type="submit"] {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; border: none;
    border-radius: 0 12px 12px 0;
    padding: 12px 20px;
    font-size: 13px; font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer; transition: all 0.25s;
}
.sidebar .sidebar-block .wp-block-search__button:hover,
.sidebar .sidebar-block input[type="submit"]:hover {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

/* Rainbow top on first widget (search) */
.sidebar .sidebar-block:first-child::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--rainbow);
    background-size: 300% 100%;
    animation: rainbow-shift 4s linear infinite;
}

/* Latest posts */
.sidebar .sidebar-block .wp-block-latest-posts {
    list-style: none; margin: 0; padding: 6px 0;
}
.sidebar .sidebar-block .wp-block-latest-posts li + li {
    border-top: 1px solid #f3f3f5;
}
.sidebar .sidebar-block .wp-block-latest-posts__post-title {
    display: flex; align-items: center;
    padding: 13px 22px;
    color: var(--dark) !important;
    font-size: 14px; font-weight: 700; line-height: 1.4;
    transition: all 0.25s;
    border-left: 3px solid transparent;
}
.sidebar .sidebar-block .wp-block-latest-posts__post-title::before {
    content: '🎨'; margin-right: 10px; font-size: 15px; flex-shrink: 0;
}
.sidebar .sidebar-block .wp-block-latest-posts li:hover .wp-block-latest-posts__post-title {
    background: linear-gradient(90deg, rgba(255,107,107,0.05), transparent);
    border-left-color: var(--primary);
    color: var(--primary) !important;
    padding-left: 26px;
}

/* Latest comments */
.sidebar .sidebar-block .wp-block-latest-comments {
    padding: 20px 22px; margin: 0;
    font-size: 14px; color: #aaa;
    font-weight: 600; text-align: center;
}

/* Archives */
.sidebar .sidebar-block .wp-block-archives {
    list-style: none; margin: 0; padding: 6px 0;
}
.sidebar .sidebar-block .wp-block-archives li + li {
    border-top: 1px solid #f3f3f5;
}
.sidebar .sidebar-block .wp-block-archives li a {
    display: flex; align-items: center;
    padding: 13px 22px;
    color: #555; font-size: 14px; font-weight: 700;
    transition: all 0.25s;
    border-left: 3px solid transparent;
}
.sidebar .sidebar-block .wp-block-archives li a::before {
    content: '📅'; margin-right: 10px;
}
.sidebar .sidebar-block .wp-block-archives li:hover a {
    background: linear-gradient(90deg, rgba(254,202,87,0.1), transparent);
    border-left-color: var(--accent);
    color: var(--primary-dark);
    padding-left: 26px;
}

/* Categories */
.sidebar .sidebar-block .wp-block-categories {
    list-style: none; margin: 0; padding: 6px 0;
}
.sidebar .sidebar-block .wp-block-categories li + li {
    border-top: 1px solid #f3f3f5;
}
.sidebar .sidebar-block .wp-block-categories li a {
    display: flex; align-items: center;
    padding: 13px 22px;
    color: #555; font-size: 14px; font-weight: 700;
    transition: all 0.25s;
    border-left: 3px solid transparent;
}
.sidebar .sidebar-block .wp-block-categories li:nth-child(1) a::before { content: '🏰'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:nth-child(2) a::before { content: '🦋'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:nth-child(3) a::before { content: '🎭'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:nth-child(4) a::before { content: '🔮'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:nth-child(5) a::before { content: '🌿'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:nth-child(6) a::before { content: '🧚'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:nth-child(7) a::before { content: '✨'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:nth-child(8) a::before { content: '🌸'; margin-right: 10px; }
.sidebar .sidebar-block .wp-block-categories li:hover a {
    background: linear-gradient(90deg, rgba(29,209,161,0.06), transparent);
    border-left-color: var(--green);
    color: var(--primary);
    padding-left: 26px;
}

/* Reset block paddings inside widget */
.sidebar .sidebar-block .wp-block-group { margin: 0; padding: 0; }
.sidebar .sidebar-block ul { padding-left: 0; }

/* ============================================
   Authors Gallery Section
   ============================================ */
.authors-section {
    max-width: 1300px;
    margin: 0 auto 50px;
    padding: 0 28px;
}

.authors-section .section-header {
    margin-bottom: 30px;
}

.authors-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.author-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}
.author-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* Rainbow border on hover */
.author-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--rainbow);
    background-size: 300% 100%;
    animation: rainbow-shift 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}
.author-card:hover::after { opacity: 1; }

.author-artwork {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}
.author-artwork img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.author-card:hover .author-artwork img {
    transform: scale(1.08);
}

/* Placeholder gradient for cards without images */
.author-artwork .artwork-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    opacity: 0.7;
    transition: all 0.4s;
}
.author-card:hover .artwork-placeholder {
    transform: scale(1.15) rotate(5deg);
    opacity: 1;
}

.artwork-gradient-1 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ff9a9e 100%); }
.artwork-gradient-2 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 50%, #f6d5f7 100%); }
.artwork-gradient-3 { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 50%, #667eea 100%); }
.artwork-gradient-4 { background: linear-gradient(135deg, #96fbc4 0%, #f9f586 50%, #ffecd2 100%); }
.artwork-gradient-5 { background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ffecd2 100%); }
.artwork-gradient-6 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #ffc3a0 100%); }

/* Overlay with author name on image */
.author-artwork .artwork-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 40px 20px 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.artwork-overlay .artwork-style {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.artwork-overlay .artwork-likes {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.author-info {
    padding: 20px 22px;
}

.author-info-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255,107,107,0.25);
}

.author-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.3;
}
.author-role {
    font-size: 12px;
    color: #bbb;
    font-weight: 700;
}

.author-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 14px;
}

.author-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.author-tag {
    background: linear-gradient(135deg, rgba(255,107,107,0.08), rgba(95,39,205,0.08));
    color: var(--secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s;
}
.author-tag:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.author-stats {
    display: flex;
    gap: 16px;
    padding-top: 14px;
    border-top: 2px solid #f5f5f7;
}
.author-stat {
    text-align: center;
    flex: 1;
}
.author-stat-num {
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}
.author-stat-label {
    font-size: 11px;
    color: #ccc;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* "View all" button */
.authors-view-all {
    text-align: center;
    margin-top: 30px;
}
.authors-view-all a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    padding: 14px 36px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(255,107,107,0.3);
    transition: all 0.3s;
}
.authors-view-all a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,107,107,0.4);
}

/* ============================================
   Contests Section
   ============================================ */
.contests-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 28px;
}
.section-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary) !important;
    transition: all 0.25s;
}
.section-link:hover {
    color: var(--secondary) !important;
    transform: translateX(3px);
}
.contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.contest-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
    position: relative;
}
.contest-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover);
}
.contest-card-header {
    position: relative;
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contest-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contest-color-1 .contest-card-header { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.contest-color-2 .contest-card-header { background: linear-gradient(135deg, #a55eea, #8854d0); }
.contest-color-3 .contest-card-header { background: linear-gradient(135deg, #48dbfb, #0abde3); }
.contest-color-4 .contest-card-header { background: linear-gradient(135deg, #1dd1a1, #10ac84); }
.contest-color-5 .contest-card-header { background: linear-gradient(135deg, #feca57, #ff9f43); }
.contest-color-6 .contest-card-header { background: var(--rainbow); background-size: 300% 300%; animation: rainbow-shift 4s linear infinite; }

.contest-icon {
    font-size: 60px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}
.contest-status {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}
.status-active { background: #1dd1a1; color: #fff; }
.status-upcoming { background: #48dbfb; color: #fff; }
.status-voting { background: #feca57; color: #333; }
.status-ended { background: #636e72; color: #fff; }

.contest-card-body {
    padding: 20px 24px 24px;
}
.contest-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--dark);
}
.contest-title a { color: inherit; }
.contest-title a:hover { color: var(--primary); }
.contest-desc {
    font-size: 14px;
    color: #777;
    margin-bottom: 12px;
    line-height: 1.5;
}
.contest-prize {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(254,202,87,0.15), rgba(255,159,67,0.15));
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #e17055;
    margin-bottom: 12px;
}
.prize-icon { font-size: 18px; }
.contest-meta-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #999;
    font-weight: 600;
}
.contest-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.contest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,107,107,0.4);
}

/* ============================================
   Contacts Section
   ============================================ */
.contacts-section {
    background: linear-gradient(135deg, #2d3436 0%, #222f3e 50%, #2d3436 100%);
    padding: 50px 0;
    margin-top: 40px;
}
.contacts-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 28px;
}
.contacts-section .section-title {
    color: #fff;
}
.contacts-section .section-title::before {
    background: linear-gradient(180deg, #feca57, #ff6b6b);
}
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 10px;
}
.contact-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s;
}
.contact-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
.contact-card-main {
    border: 1px solid rgba(255,107,107,0.3);
    background: linear-gradient(135deg, rgba(255,107,107,0.1), rgba(95,39,205,0.1));
}
.contact-card-icon {
    font-size: 36px;
    margin-bottom: 14px;
}
.contact-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}
.contact-card p {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin-bottom: 16px;
}
.contact-link {
    display: block;
    color: #48dbfb !important;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.25s;
}
.contact-link:hover {
    color: #feca57 !important;
    transform: translateX(4px);
}
.contact-email-link {
    color: #ff6b6b !important;
    font-size: 16px;
}
.contact-email-link:hover { color: #feca57 !important; }

.contact-socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff !important;
    transition: all 0.3s;
}
.social-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.social-icon { font-size: 20px; }
.social-telegram { background: linear-gradient(135deg, #0088cc, #00b4d8); }
.social-vk { background: linear-gradient(135deg, #4a76a8, #5181b8); }
.social-youtube { background: linear-gradient(135deg, #ff0000, #cc0000); }

.contact-info-line {
    font-size: 14px;
    color: rgba(255,255,255,0.7) !important;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* ============================================
   Ad Zones
   ============================================ */
.ad-zone {
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 28px;
    text-align: center;
}
.ad-slot {
    background: linear-gradient(135deg, rgba(248,249,252,0.8), rgba(240,242,248,0.8));
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.ad-slot:hover {
    border-color: #ccc;
    background: rgba(248,249,252,0.95);
}
.ad-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #bbb;
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
}
.ad-slot img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.ad-header {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ad-content {
    min-height: 100px;
}
.ad-sidebar {
    min-height: 250px;
}
.ad-prefooter {
    min-height: 90px;
}
.ad-in-article {
    margin: 24px 0;
    min-height: 200px;
}
.ad-zone-header { margin-bottom: 0; padding-top: 16px; padding-bottom: 8px; }
.ad-zone-content { padding: 16px 28px; }
.ad-zone-prefooter { padding: 20px 28px 0; }

/* ============================================
   Contest Single Page
   ============================================ */
.contest-single {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}
.contest-single-header {
    text-align: center;
    margin-bottom: 36px;
}
.contest-single-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}
.contest-single-badge.status-active {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
    color: #fff;
}
.contest-single-badge.status-upcoming {
    background: linear-gradient(135deg, #feca57, #f39c12);
    color: #fff;
}
.contest-single-badge.status-voting {
    background: linear-gradient(135deg, #5f27cd, #341f97);
    color: #fff;
}
.contest-single-badge.status-ended {
    background: linear-gradient(135deg, #8395a7, #576574);
    color: #fff;
}
.contest-single-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.2;
}
.contest-single-meta {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}
.contest-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #666;
    font-weight: 600;
}
.contest-meta-icon {
    font-size: 20px;
}
.contest-single-body {
    background: #fff;
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
}
.contest-single-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}
.contest-single-image img {
    width: 100%;
    height: auto;
    display: block;
}
.contest-single-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}
.contest-single-content p {
    margin-bottom: 16px;
}
.contest-prize-block {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
    border: 2px solid #feca57;
    border-radius: 16px;
    padding: 24px;
    margin-top: 28px;
}
.contest-prize-icon {
    font-size: 48px;
    flex-shrink: 0;
}
.contest-prize-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #b8860b;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.contest-prize-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
}
.contest-prize-desc {
    font-size: 14px;
    color: #666;
    margin-top: 6px;
}

/* ============================================
   Submission Form
   ============================================ */
.contest-submission-section {
    background: #fff;
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
}
.contest-section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 24px;
}
.gallery-count {
    font-weight: 600;
    color: #999;
    font-size: 18px;
}
.submission-form {
    max-width: 700px;
}
.submission-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.submission-field label {
    display: block;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 15px;
}
.submission-field label .required {
    color: var(--primary);
}
.submission-field input[type="text"],
.submission-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.3s;
    background: #fafafa;
}
.submission-field input[type="text"]:focus,
.submission-field textarea:focus {
    border-color: var(--secondary);
    outline: none;
    background: #fff;
}
.submission-upload-area {
    border: 3px dashed #d0d0d0;
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #f8f0ff 0%, #f0f4ff 50%, #fff0f5 100%);
    position: relative;
    overflow: hidden;
}
.submission-upload-area:hover,
.submission-upload-area.drag-over {
    border-color: var(--secondary);
    background: linear-gradient(135deg, #f0e6ff 0%, #e6ecff 50%, #ffe6f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 39, 205, 0.15);
}
.submission-upload-area.has-file {
    border-color: var(--green);
    border-style: solid;
}
.submission-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.upload-icon {
    font-size: 52px;
    margin-bottom: 12px;
}
.upload-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}
.upload-hint {
    font-size: 13px;
    color: #999;
}
.upload-preview {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.1);
}
.upload-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.upload-preview-name {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    font-weight: 600;
}
.submission-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--secondary), #341f97);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(95, 39, 205, 0.3);
}
.submission-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 39, 205, 0.4);
    color: #fff;
}
.submission-note {
    margin-top: 14px;
    font-size: 13px;
    color: #999;
}
.submission-message {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 15px;
}
.submission-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc3333;
}
.submission-success {
    background: #f0fff4;
    border: 1px solid #b2f2bb;
    color: #2b8a3e;
}
.submission-login-prompt {
    text-align: center;
    padding: 30px;
    background: #f8f9fc;
    border-radius: 16px;
}
.submission-login-prompt p {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
}
.contest-closed-notice {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fc, #f0f0f5);
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    color: #666;
}

/* ============================================
   Submissions Gallery
   ============================================ */
.contest-gallery-section {
    margin-bottom: 40px;
}
.submissions-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}
.submissions-featured {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.submission-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
}
.submission-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover);
}
.submission-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.submission-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.submission-card:hover .submission-card-image img {
    transform: scale(1.05);
}
.submission-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}
.submission-featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #feca57, #f39c12);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.submission-card-info {
    padding: 16px;
}
.submission-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}
.submission-card-author {
    font-size: 13px;
    color: #999;
    font-weight: 600;
}
.submission-card.submission-featured {
    border: 2px solid #feca57;
}

/* ============================================
   Submission Status Badges
   ============================================ */
.submission-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}
.submission-status.status-pending {
    background: #fff3e0;
    color: #e67e22;
}
.submission-status.status-approved {
    background: #e8f5e9;
    color: #27ae60;
}
.submission-status.status-rejected {
    background: #ffebee;
    color: #e74c3c;
}
.submission-status.status-featured {
    background: linear-gradient(135deg, #f3e5f5, #ede7f6);
    color: #8e44ad;
}

/* ============================================
   Lightbox
   ============================================ */
.submission-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.2s;
}
.lightbox-close:hover {
    transform: scale(1.2);
}
.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.lightbox-caption {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
}

/* ============================================
   Cabinet Submissions
   ============================================ */
.cabinet-submissions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cabinet-submission-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fc;
    border-radius: 14px;
    transition: all 0.2s;
}
.cabinet-submission-item:hover {
    background: #f0f2f8;
    transform: translateX(4px);
}
.cabinet-submission-thumb {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}
.cabinet-submission-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cabinet-submission-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0e6ff, #e6ecff);
    font-size: 28px;
}
.cabinet-submission-info {
    flex: 1;
    min-width: 0;
}
.cabinet-submission-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}
.cabinet-submission-contest {
    font-size: 13px;
    color: #666;
}
.cabinet-submission-contest a {
    color: var(--secondary);
    font-weight: 600;
}
.cabinet-submission-date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}
.cabinet-submission-status {
    flex-shrink: 0;
}

/* ============================================
   Badges & Rating System
   ============================================ */

/* User level display */
.user-level {
    background: linear-gradient(135deg, rgba(255,107,107,0.06), rgba(95,39,205,0.06));
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 2px solid rgba(95,39,205,0.08);
}
.user-level-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.user-level-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.user-level-name {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.user-level-points {
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    color: #999;
    background: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Rating progress bar */
.rating-progress {
    height: 10px;
    background: #e8e8ee;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.rating-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--green), var(--accent2), var(--secondary));
    background-size: 300% 100%;
    animation: rainbow-shift 4s linear infinite;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.rating-progress-label {
    font-size: 12px;
    color: #aaa;
    font-weight: 700;
    margin-top: 6px;
    text-align: right;
}

/* Cabinet level badge in sidebar */
.cabinet-user-level-badge {
    margin-top: 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Badges section in cabinet */
.cabinet-badges-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f5f5f5;
}
.cabinet-badges-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cabinet-badges-title::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), var(--primary));
}
.badges-empty-text {
    color: #bbb;
    font-size: 14px;
    font-weight: 600;
    padding: 16px 20px;
    background: #f9f9fb;
    border-radius: 12px;
    text-align: center;
}

/* User badges row (inline) */
.user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Badge grid (for cabinet profile) */
.user-badges.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

/* Individual badge */
.badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border-radius: 25px;
    border: 2px solid var(--badge-color, #eee);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: default;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}
.badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    border-color: var(--badge-color, var(--primary));
}
.badge-icon {
    font-size: 18px;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.badge:hover .badge-icon {
    transform: scale(1.25) rotate(8deg);
}
.badge-name {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge tooltip */
.badge-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--dark);
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 260px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}
.badge-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--dark);
}
.badge:hover .badge-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Grid badges have name visible */
.badge-grid .badge {
    padding: 10px 14px;
    border-radius: 14px;
    flex-direction: column;
    text-align: center;
    gap: 4px;
}
.badge-grid .badge-icon {
    font-size: 28px;
}
.badge-grid .badge-name {
    font-size: 11px;
}

/* Comment badges */
.comment-badges {
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
    vertical-align: middle;
}
.comment-badge {
    font-size: 14px;
    cursor: default;
    transition: transform 0.2s;
}
.comment-badge:hover {
    transform: scale(1.3);
}
.comment-badge-more {
    font-size: 10px;
    font-weight: 800;
    color: #999;
    background: #f0f0f0;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.6;
}
.comment-level {
    font-size: 14px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Author card badges */
.author-card .user-badges {
    padding: 0 22px 14px;
}
.author-card .badge {
    padding: 3px 10px;
    font-size: 11px;
    border-width: 1.5px;
}
.author-card .badge-icon {
    font-size: 14px;
}



/* =============================================
   СТОРОННИЕ РАСКРАСКИ
   ============================================= */
.thirdparty-section {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 24px;
}
.thirdparty-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.thirdparty-section .section-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}
.thirdparty-section .section-link:hover { color: var(--secondary); }

.thirdparty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tp-book-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.tp-book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.tp-book-cover {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
}
.tp-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.tp-book-card:hover .tp-book-cover img {
    transform: scale(1.05);
}
.tp-book-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
}
.tp-book-price {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), #ee5a24);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(255,107,107,0.4);
}

.tp-book-info {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.tp-book-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.3;
}
.tp-book-title a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.2s;
}
.tp-book-title a:hover { color: var(--primary); }

.tp-book-publisher {
    font-size: 13px;
    color: #888;
    font-weight: 600;
    margin-bottom: 10px;
}

.tp-book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #999;
    margin-bottom: 14px;
}
.tp-book-rating {
    font-size: 14px;
    letter-spacing: -1px;
}
.tp-book-pages, .tp-book-age {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.tp-book-buy {
    display: inline-block;
    margin-top: auto;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--secondary), #48dbfb);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tp-book-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(95,39,205,0.3);
}

@media (max-width: 900px) {
    .thirdparty-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .tp-book-cover { height: 200px; }
}
@media (max-width: 600px) {
    .thirdparty-grid { grid-template-columns: 1fr; }
    .thirdparty-section { padding: 24px 16px; }
}

/* =============================================
   АВАТАР В КАБИНЕТЕ
   ============================================= */
.avatar-upload-group { margin-bottom: 24px !important; }
.avatar-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 8px;
}
.avatar-preview {
    width: 100px; height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #eee;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.avatar-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.avatar-upload-controls {
    flex: 1;
}
.avatar-upload-controls input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.3s;
    font-size: 13px;
}
.avatar-upload-controls input[type="file"]:hover {
    border-color: var(--primary);
}
.avatar-delete-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #e74c3c;
    cursor: pointer;
}
.avatar-delete-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.cabinet-avatar img {
    border-radius: 50%;
    object-fit: cover;
}

/* =============================================
   СИСТЕМА СООБЩЕНИЙ (ICQ Style)
   ============================================= */

/* Иконка в шапке */
.user-msg-link {
    position: relative;
    font-size: 20px;
    text-decoration: none;
    width: 38px; height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: #fff !important;
    transition: transform 0.3s, box-shadow 0.3s;
}
.user-msg-link:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
}
.msg-unread-badge {
    position: absolute;
    top: -5px; right: -5px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 20px; height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(231,76,60,0.5);
    animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.nav-count-alert {
    background: #e74c3c !important;
    color: #fff !important;
    animation: badge-pulse 2s infinite;
}

/* ======= МЕССЕНДЖЕР-ОБЁРТКА ======= */
.msg-messenger {
    background: #f0f2f5;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
    min-height: 500px;
}

/* ======= ЗАГОЛОВОК ======= */
.msg-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.msg-header-row .cabinet-section-title {
    color: #fff !important;
    margin: 0;
    font-size: 20px;
}
.msg-header-row .cabinet-section-title::after { display: none; }
.msg-new-btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 10px 22px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}
.msg-new-btn:hover {
    background: rgba(255,255,255,0.35);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ======= НОВОЕ СООБЩЕНИЕ ======= */
.msg-new-dialog-box {
    background: #fff;
    border-radius: 0;
    padding: 24px;
    margin: 0;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.msg-new-dialog-box .form-group {
    margin-bottom: 16px;
}
.msg-new-dialog-box .form-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
    display: block;
}
.msg-new-dialog-box input[type="text"],
.msg-new-dialog-box textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fafafa;
}
.msg-new-dialog-box input:focus,
.msg-new-dialog-box textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
    outline: none;
    background: #fff;
}
.msg-new-dialog-box .auth-btn {
    width: auto;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 14px;
}

/* Поиск пользователей */
.msg-search-results {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    margin-top: 4px;
}
.msg-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}
.msg-search-item:last-child { border-bottom: none; }
.msg-search-item:hover { background: #f0f4ff; }
.msg-search-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.msg-search-item span { font-weight: 600; font-size: 14px; }
.msg-search-item small { color: #999; font-weight: 400; }
.msg-search-empty { padding: 16px; color: #aaa; font-size: 13px; text-align: center; }

/* ======= СПИСОК ДИАЛОГОВ (ICQ style) ======= */
.msg-dialogs-list {
    display: flex;
    flex-direction: column;
    background: #fff;
}
.msg-dialog-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--dark);
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}
.msg-dialog-item:last-child { border-bottom: none; }
.msg-dialog-item:hover { background: #f8f9ff; }
.msg-dialog-unread {
    background: #f0f4ff;
}
.msg-dialog-unread::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 0 4px 4px 0;
}

.msg-dialog-avatar {
    position: relative;
    flex-shrink: 0;
}
.msg-dialog-avatar img {
    border-radius: 50%;
    width: 52px; height: 52px;
    object-fit: cover;
    border: 2px solid #e8e8e8;
}
.msg-dialog-unread .msg-dialog-avatar img {
    border-color: #667eea;
}
.msg-unread-dot {
    position: absolute;
    bottom: 1px; right: 1px;
    width: 14px; height: 14px;
    background: #1dd1a1;
    border-radius: 50%;
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(29,209,161,0.4);
}

.msg-dialog-info { flex: 1; min-width: 0; }
.msg-dialog-name { font-weight: 800; font-size: 15px; margin-bottom: 4px; color: #2c3e50; }
.msg-dialog-unread .msg-dialog-name { color: #667eea; }
.msg-dialog-preview {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
.msg-dialog-unread .msg-dialog-preview { color: #555; font-weight: 600; }

.msg-dialog-meta { text-align: right; flex-shrink: 0; }
.msg-dialog-time { font-size: 11px; color: #bbb; display: block; margin-bottom: 6px; }
.msg-unread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 24px; height: 24px;
    border-radius: 12px;
    padding: 0 7px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}

/* ======= ЧАТ (диалог) ======= */
.msg-conversation-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.msg-back-btn {
    color: rgba(255,255,255,0.8);
    font-weight: 700;
    text-decoration: none;
    font-size: 20px;
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transition: background 0.2s;
}
.msg-back-btn:hover { background: rgba(255,255,255,0.3); color: #fff; }
.msg-conv-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.msg-conv-user img {
    border-radius: 50%;
    width: 40px; height: 40px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}
.msg-conv-user strong { font-size: 16px; color: #fff; }

.msg-conversation-body {
    max-height: 480px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f0f2f5;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(102,126,234,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118,75,162,0.03) 0%, transparent 50%);
}
.msg-conversation-body::-webkit-scrollbar { width: 6px; }
.msg-conversation-body::-webkit-scrollbar-track { background: transparent; }
.msg-conversation-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.msg-conversation-body::-webkit-scrollbar-thumb:hover { background: #aaa; }

.msg-empty {
    text-align: center;
    color: #aaa;
    padding: 60px 20px;
    font-size: 15px;
}
.msg-empty::before {
    content: '💬';
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
}

/* Пузырьки сообщений */
.msg-bubble {
    max-width: 70%;
    padding: 12px 16px;
    position: relative;
    word-break: break-word;
    animation: bubble-in 0.25s ease-out;
}
@keyframes bubble-in {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.msg-bubble-mine {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 20px 20px 6px 20px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.25);
}
.msg-bubble-their {
    align-self: flex-start;
    background: #fff;
    color: var(--dark);
    border-radius: 20px 20px 20px 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.msg-bubble-text { font-size: 14px; line-height: 1.55; }
.msg-bubble-time {
    font-size: 10px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.msg-bubble-mine .msg-bubble-time { color: rgba(255,255,255,0.5); justify-content: flex-end; }
.msg-bubble-their .msg-bubble-time { color: #bbb; }

.msg-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 0 4px;
    line-height: 1;
}
.msg-bubble:hover .msg-delete-btn { opacity: 0.5; }
.msg-delete-btn:hover { opacity: 1 !important; }
.msg-bubble-mine .msg-delete-btn { color: rgba(255,255,255,0.7); }
.msg-bubble-their .msg-delete-btn { color: #ccc; }

/* Форма ответа */
.msg-reply-form {
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
}
.msg-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.msg-input-row textarea {
    flex: 1;
    border: 2px solid #e8e8e8;
    border-radius: 22px;
    padding: 11px 18px;
    font-size: 14px;
    resize: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    background: #f8f9fa;
    max-height: 120px;
}
.msg-input-row textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
    outline: none;
    background: #fff;
}
.msg-send-btn {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}
.msg-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}
.msg-send-btn:active { transform: scale(0.95); }

/* Пустое состояние */
.cabinet-empty {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
    background: #fff;
    border-radius: 0 0 20px 20px;
}
.cabinet-empty::before {
    content: '📭';
    display: block;
    font-size: 48px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .msg-bubble { max-width: 88%; }
    .msg-conversation-body { max-height: 380px; padding: 14px; }
    .msg-header-row { flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; }
    .msg-dialog-item { padding: 12px 14px; }
    .msg-dialog-avatar img { width: 44px; height: 44px; }
    .msg-dialog-preview { max-width: 180px; }
}


/* ============================================
   YouTube Video Responsive Embed
   ============================================ */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 24px 0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    background: #000;
}
.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: none;
}
.entry-content .video-responsive {
    margin: 30px 0;
}


/* ============================================
   Online Users Block
   ============================================ */
.online-block {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.online-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}
.online-pulse {
    width: 10px; height: 10px;
    background: #1dd1a1;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}
.online-pulse::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(29,209,161,0.3);
    animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}
.online-title strong {
    color: var(--dark);
    font-size: 16px;
}
.online-users-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.online-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: rgba(29,209,161,0.06);
    border-radius: 24px;
    transition: background 0.2s;
}
.online-user:hover {
    background: rgba(29,209,161,0.12);
}
.online-avatar {
    position: relative;
    width: 32px; height: 32px;
    flex-shrink: 0;
}
.online-avatar img {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.online-dot {
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    background: #1dd1a1;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}
.online-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}
.online-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: 6px;
    font-size: 10px;
    color: #fff;
    flex-shrink: 0;
}
.online-guests {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 13px;
    color: var(--text-secondary);
}

/* Status indicators (для сообщений/кабинета) */
.status-online { color: #1dd1a1; font-size: 10px; }
.status-away { color: #feca57; font-size: 10px; }
.status-offline { color: #ccc; font-size: 10px; }

/* Online block in footer */
.footer-online {
    max-width: 600px;
    margin: 0 auto 16px;
    padding: 0 28px;
}

/* Compact online block in footer */
.site-footer .footer-online {
    max-width: 500px;
    margin: 0 auto 12px;
}
.site-footer .footer-online .online-block {
    padding: 10px 16px;
    border-radius: 10px;
}
.site-footer .footer-online .online-header {
    margin-bottom: 6px;
    font-size: 13px;
}
.site-footer .footer-online .online-guests,
.site-footer .footer-online .online-login-hint {
    font-size: 12px;
    padding: 4px 0;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.site-footer .footer-online .online-users-list {
    padding: 4px 0;
    gap: 6px;
}


/* ============================================
   Online / Offline Status Indicators
   ============================================ */

/* --- Кабинет: под профилем --- */
.cabinet-user-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.cabinet-user-status.status-is-online {
    background: rgba(29,209,161,0.12);
    color: #1dd1a1;
}
.cabinet-user-status.status-is-offline {
    background: rgba(150,150,150,0.1);
    color: #999;
}
.cabinet-user-status .status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-is-online .status-dot {
    background: #1dd1a1;
    box-shadow: 0 0 6px rgba(29,209,161,0.5);
    animation: status-glow 2s ease-in-out infinite;
}
.status-is-offline .status-dot {
    background: #bbb;
}
@keyframes status-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(29,209,161,0.3); }
    50% { box-shadow: 0 0 10px rgba(29,209,161,0.6); }
}

/* --- Хедер: зелёная точка у аватарки --- */
.header-avatar-wrap {
    position: relative;
    display: inline-flex;
}
.header-avatar-wrap img {
    border-radius: 50%;
}
.header-online-dot {
    position: absolute;
    bottom: -1px; right: -1px;
    width: 9px; height: 9px;
    background: #1dd1a1;
    border-radius: 50%;
    border: 2px solid var(--dark);
}

/* --- Диалоги: точка онлайн у аватарки --- */
.msg-online-dot {
    position: absolute;
    bottom: 2px; right: 2px;
    width: 12px; height: 12px;
    background: #1dd1a1;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    box-shadow: 0 0 6px rgba(29,209,161,0.4);
}

/* --- Бейдж online в диалоге --- */
.msg-status-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 8px;
    vertical-align: middle;
    margin-left: 6px;
}
.msg-status-badge.online {
    background: rgba(29,209,161,0.15);
    color: #1dd1a1;
}


/* ============================================
   Author Bar (top of article)
   ============================================ */
.article-author-bar {
    margin-bottom: 20px;
}
.author-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 8px 16px 8px 8px;
    border-radius: 40px;
    transition: background 0.2s;
}
.author-bar-link:hover {
    background: rgba(0,0,0,0.04);
}
.author-bar-avatar {
    position: relative;
    flex-shrink: 0;
}
.author-bar-avatar img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.author-bar-online {
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    background: #1dd1a1;
    border-radius: 50%;
    border: 2px solid #fff;
}
.author-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.author-bar-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.author-bar-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 7px;
    font-size: 12px;
    color: #fff;
}
.author-bar-date {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   Author Box (bottom of article)
   ============================================ */
.author-box {
    margin: 40px 0;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}
.author-box-header {
    padding: 14px 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgba(0,0,0,0.015);
}
.author-box-content {
    display: flex;
    gap: 20px;
    padding: 24px;
}
.author-box-avatar {
    position: relative;
    flex-shrink: 0;
}
.author-box-avatar img {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(95,39,205,0.1);
}
.author-box-online {
    position: absolute;
    bottom: 4px; right: 4px;
    width: 14px; height: 14px;
    background: #1dd1a1;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 8px rgba(29,209,161,0.4);
}
.author-box-info {
    flex: 1;
    min-width: 0;
}
.author-box-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.author-box-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.author-box-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 8px;
}
.author-box-status.online {
    background: rgba(29,209,161,0.12);
    color: #1dd1a1;
}
.author-box-status.offline {
    background: rgba(150,150,150,0.1);
    color: #bbb;
}
.author-box-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.author-box-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.author-box-badges {
    display: inline-flex;
    gap: 4px;
    margin-top: 4px;
}
.author-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    font-size: 14px;
    cursor: help;
}
.author-box-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.author-box-link:hover {
    color: var(--primary);
}

@media (max-width: 600px) {
    .author-box-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .author-box-name {
        justify-content: center;
    }
    .author-box-meta {
        justify-content: center;
    }
}


/* ============================================
   Online Block — Footer Override (dark bg)
   ============================================ */
.site-footer .online-block,
.footer-online .online-block {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    backdrop-filter: blur(12px);
}
.site-footer .online-block *,
.footer-online .online-block * {
    color: rgba(255,255,255,0.85);
}
.site-footer .online-title,
.footer-online .online-title {
    color: rgba(255,255,255,0.8);
}
.site-footer .online-title strong,
.footer-online .online-title strong {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}
.site-footer .online-header,
.footer-online .online-header {
    color: rgba(255,255,255,0.75);
}
.site-footer .online-user,
.footer-online .online-user {
    background: rgba(29,209,161,0.15);
    border: 1px solid rgba(29,209,161,0.25);
}
.site-footer .online-user:hover,
.footer-online .online-user:hover {
    background: rgba(29,209,161,0.28);
    border-color: rgba(29,209,161,0.4);
}
.site-footer .online-user-name,
.footer-online .online-user-name {
    color: #fff !important;
    font-weight: 600;
}
.site-footer .online-dot,
.footer-online .online-dot {
    border-color: rgba(40,44,52,0.8);
}
.site-footer .online-guests,
.footer-online .online-guests {
    border-top: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7) !important;
    font-size: 13px;
}
.site-footer .online-pulse,
.footer-online .online-pulse {
    box-shadow: 0 0 10px rgba(29,209,161,0.6);
}

/* ============================================
   Auth Pages — Additional Styles
   ============================================ */
.auth-icon-big {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
    line-height: 1;
}
.auth-message.auth-info {
    background: rgba(108,92,231,0.08);
    border: 1px solid rgba(108,92,231,0.2);
    color: var(--dark);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
}
.auth-message.auth-success {
    background: rgba(29,209,161,0.08);
    border: 1px solid rgba(29,209,161,0.2);
    color: var(--dark);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}
.auth-message.auth-warning {
    background: rgba(254,202,87,0.1);
    border: 1px solid rgba(254,202,87,0.3);
    color: var(--dark);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}
.auth-btn.auth-btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.auth-btn.auth-btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}
.cabinet-activated-banner {
    background: linear-gradient(135deg, rgba(29,209,161,0.1), rgba(108,92,231,0.1));
    border: 1px solid rgba(29,209,161,0.25);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 15px;
    color: var(--dark);
    animation: fadeInScale 0.5s ease;
}
.cabinet-activated-banner strong {
    color: #1dd1a1;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================
   Public Profile Page
   ============================================ */
.profile-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(108,92,231,0.08);
    margin-bottom: 32px;
}
.profile-card-header {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.profile-avatar-wrap img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(108,92,231,0.15);
}
.profile-status-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
}
.profile-status-dot.online { background: #1dd1a1; box-shadow: 0 0 8px rgba(29,209,161,0.5); }
.profile-status-dot.offline { background: #b2bec3; }
.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}
.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    width: fit-content;
}
.profile-status-text {
    font-size: 14px;
    font-weight: 600;
}
.profile-status-text.online { color: #1dd1a1; }
.profile-status-text.offline { color: #b2bec3; }
.profile-msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
    white-space: nowrap;
    align-self: flex-start;
}
.profile-msg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.4);
    color: #fff;
}
.profile-bio {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}
.profile-stats {
    display: flex;
    gap: 32px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.06);
    flex-wrap: wrap;
}
.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.profile-stat-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}
.profile-stat-label {
    font-size: 13px;
    color: var(--muted);
}
.profile-section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
}

/* Chat — clickable profile link */
.msg-conv-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
    transition: opacity 0.2s;
}
.msg-conv-user-link:hover {
    opacity: 0.75;
    color: var(--primary);
}
.msg-conv-user-link img {
    border-radius: 50%;
}
.msg-dialog-profile-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
.msg-dialog-profile-link:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .profile-card-header { flex-direction: column; text-align: center; align-items: center; }
    .profile-info { align-items: center; }
    .profile-stats { justify-content: center; }
    .profile-msg-btn { align-self: center; }
}


/* ============================================
   Public Profile Page
   ============================================ */
.profile-hero {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(108,92,231,0.12);
}
.profile-hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 40%, #fd79a8 70%, #fdcb6e 100%);
    background-size: 300% 300%;
    animation: profile-bg-shift 8s ease infinite;
}
@keyframes profile-bg-shift {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.profile-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 40px 36px;
}
.profile-hero-avatar {
    position: relative;
    flex-shrink: 0;
}
.profile-hero-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.profile-hero-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.4);
}
.profile-hero-status.online {
    background: #1dd1a1;
    box-shadow: 0 0 12px rgba(29,209,161,0.6);
}
.profile-hero-status.offline {
    background: rgba(255,255,255,0.4);
}
.profile-hero-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-hero-name {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
}
.profile-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.profile-hero-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 16px;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.profile-hero-online-text {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.profile-hero-online-text.online {
    color: #55efc4;
}
.profile-hero-online-text.offline {
    color: rgba(255,255,255,0.6);
}
.profile-pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #55efc4;
    animation: pulse-dot 1.5s ease infinite;
}
@keyframes pulse-dot {
    0%,100% { box-shadow: 0 0 0 0 rgba(85,239,196,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(85,239,196,0); }
}
.profile-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    width: fit-content;
}
.profile-hero-btn:hover {
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Stats bar */
.profile-stats-bar {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    border: 1px solid rgba(108,92,231,0.08);
}
.profile-stat-item {
    flex: 1;
    text-align: center;
    padding: 20px 16px;
    border-right: 1px solid rgba(0,0,0,0.05);
    transition: background 0.3s;
}
.profile-stat-item:last-child { border-right: none; }
.profile-stat-item:hover { background: rgba(108,92,231,0.03); }
.profile-stat-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}
.profile-stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* Bio card */
.profile-bio-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    border: 1px solid rgba(108,92,231,0.08);
}
.profile-bio-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 800;
    color: var(--dark);
}
.profile-bio-card p {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}

/* Posts title */
.profile-posts-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin: 8px 0 20px;
}

/* Empty posts */
.profile-empty-posts {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    border: 1px solid rgba(108,92,231,0.08);
    margin-top: 8px;
}
.profile-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.profile-empty-posts p {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .profile-hero-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 32px 24px;
    }
    .profile-hero-name { font-size: 24px; }
    .profile-hero-meta { justify-content: center; }
    .profile-hero-avatar img { width: 110px; height: 110px; }
    .profile-stats-bar { flex-direction: column; }
    .profile-stat-item { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.05); padding: 16px; }
    .profile-stat-item:last-child { border-bottom: none; }
}

/* ============================================
   Emoji Picker
   ============================================ */
.msg-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: flex-end;
}
.msg-input-wrap textarea {
    flex: 1;
    padding-right: 52px;
}
.msg-emoji-toggle {
    position: absolute;
    right: 10px;
    bottom: 6px;
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(108,92,231,0.08);
    font-size: 26px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    opacity: 1;
    z-index: 5;
}
.msg-emoji-toggle:hover {
    background: rgba(108,92,231,0.18);
    transform: scale(1.2);
    box-shadow: 0 2px 10px rgba(108,92,231,0.2);
}

.msg-emoji-picker {
    background: var(--card-bg);
    border: 1px solid rgba(108,92,231,0.12);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    margin-top: 8px;
    overflow: hidden;
    animation: emoji-slide-up 0.2s ease;
}
@keyframes emoji-slide-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tabs */
.emoji-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 10px 4px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: rgba(108,92,231,0.03);
    overflow-x: auto;
}
.emoji-tab {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.emoji-tab:hover {
    background: rgba(108,92,231,0.1);
}
.emoji-tab.active {
    background: rgba(108,92,231,0.15);
    box-shadow: 0 2px 6px rgba(108,92,231,0.15);
}

/* Search */
.emoji-search-wrap {
    padding: 8px 12px;
}
.emoji-search {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(0,0,0,0.02);
    box-sizing: border-box;
}
.emoji-search:focus {
    border-color: var(--primary);
    background: #fff;
}

/* Panels */
.emoji-panel {
    display: none;
    padding: 0 12px 12px;
    max-height: 220px;
    overflow-y: auto;
}
.emoji-panel.active {
    display: block;
}
.emoji-panel::-webkit-scrollbar {
    width: 6px;
}
.emoji-panel::-webkit-scrollbar-thumb {
    background: rgba(108,92,231,0.2);
    border-radius: 3px;
}
.emoji-cat-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 6px;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
}

/* Grid */
.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}
.emoji-item {
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.15s;
    line-height: 1;
    text-align: center;
}
.emoji-item:hover {
    background: rgba(108,92,231,0.1);
    transform: scale(1.25);
}
.emoji-item:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    .emoji-item { font-size: 22px; padding: 5px; }
    .msg-emoji-picker { margin-top: 4px; }
}

/* ============================================
   Terms & Privacy Page
   ============================================ */
.terms-page { max-width: 860px; margin: 0 auto; }
.terms-hero {
    text-align: center;
    margin-bottom: 36px;
}
.terms-hero h1 {
    font-size: 32px;
    font-weight: 900;
    color: var(--dark);
    margin: 0 0 8px;
}
.terms-hero p {
    color: var(--muted);
    font-size: 15px;
}
.terms-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(108,92,231,0.08);
}
.terms-section-icon {
    font-size: 40px;
    margin-bottom: 8px;
}
.terms-section h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 20px;
}
.terms-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin: 24px 0 12px;
}
.terms-content { color: var(--text); font-size: 14px; line-height: 1.8; }
.terms-content ul { margin: 8px 0 16px 20px; }
.terms-content li { margin-bottom: 6px; }
.terms-rule {
    border-radius: 12px;
    padding: 16px 20px;
    margin: 12px 0;
}
.terms-rule h4 { margin: 0 0 10px; font-size: 15px; }
.terms-rule ul { margin: 0 0 0 16px; }
.terms-rule-good { background: rgba(29,209,161,0.06); border: 1px solid rgba(29,209,161,0.15); }
.terms-rule-bad { background: rgba(255,71,87,0.05); border: 1px solid rgba(255,71,87,0.12); }
.terms-rule-warn { background: rgba(254,202,87,0.08); border: 1px solid rgba(254,202,87,0.2); }
.terms-data-table { margin: 12px 0; }
.terms-data-row {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 6px;
    background: rgba(108,92,231,0.03);
}
.terms-data-type { font-weight: 700; min-width: 180px; flex-shrink: 0; }
.terms-data-purpose { color: var(--muted); }
.terms-highlight { border-radius: 12px; padding: 16px 20px; margin: 12px 0; }
.terms-highlight-good { background: rgba(29,209,161,0.06); border: 1px solid rgba(29,209,161,0.15); }
.terms-highlight-good ul { list-style: none; margin-left: 0; padding: 0; }
.terms-highlight-good li { margin-bottom: 8px; }
.terms-updated { color: var(--muted); font-size: 12px; margin-top: 20px; font-style: italic; }

/* ============================================
   Registration — Terms Block
   ============================================ */
.reg-terms-block {
    margin: 20px 0 24px;
}
.reg-terms-summary {
    background: rgba(108,92,231,0.04);
    border: 1px solid rgba(108,92,231,0.12);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}
.reg-terms-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
    transition: background 0.2s;
    user-select: none;
}
.reg-terms-summary-header:hover {
    background: rgba(108,92,231,0.08);
}
.reg-terms-arrow {
    font-size: 18px;
    transition: transform 0.3s;
    color: var(--primary);
}
.reg-terms-summary-header.open .reg-terms-arrow {
    transform: rotate(180deg);
}
.reg-terms-full {
    border-top: 1px solid rgba(108,92,231,0.1);
}
.reg-terms-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding: 16px 18px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}
.reg-terms-scroll::-webkit-scrollbar { width: 5px; }
.reg-terms-scroll::-webkit-scrollbar-thumb { background: rgba(108,92,231,0.2); border-radius: 3px; }
.reg-term-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.reg-term-section:last-of-type { border-bottom: none; margin-bottom: 8px; }
.reg-term-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px;
}
.reg-term-section ul { margin: 6px 0 0 16px; padding: 0; }
.reg-term-section li { margin-bottom: 4px; }
.reg-term-good {
    background: rgba(29,209,161,0.08);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 6px 0;
    font-size: 13px;
}
.reg-term-bad {
    background: rgba(255,71,87,0.06);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 6px 0;
    font-size: 13px;
}
.reg-terms-full-link {
    text-align: center;
    margin: 12px 0 0;
}
.reg-terms-full-link a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.reg-terms-full-link a:hover { text-decoration: underline; }

/* Checkboxes */
.reg-checkbox-group { margin-bottom: 10px; }
.reg-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    padding: 6px 0;
}
.reg-terms-check input[type=checkbox] {
    display: none;
}
.reg-check-mark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    margin-top: 1px;
}
.reg-terms-check input:checked + .reg-check-mark {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-color: #6c5ce7;
}
.reg-terms-check input:checked + .reg-check-mark::after {
    content: ✓;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.reg-terms-check a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.reg-terms-check a:hover { text-decoration: underline; }

/* Disabled submit */
.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .terms-section { padding: 20px; }
    .terms-data-row { flex-direction: column; gap: 4px; }
    .terms-data-type { min-width: auto; }
}



/* =============================================
   КОНКУРСЫ — СТИЛИ
   ============================================= */

/* --- Hero --- */
.contest-hero {
    border-radius: 20px;
    padding: 50px 40px;
    color: #fff;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}
.contest-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.contest-hero-inner { position: relative; z-index: 1; }
.contest-status-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}
.contest-title {
    font-size: 2.2em;
    font-weight: 800;
    margin: 0 0 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.contest-excerpt {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0 0 24px;
    max-width: 600px;
}
.contest-hero-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.contest-stat {
    text-align: center;
}
.contest-stat-num {
    display: block;
    font-size: 1.8em;
    font-weight: 800;
}
.contest-stat-label {
    font-size: 0.85em;
    opacity: 0.8;
}

/* --- Body --- */
.contest-body { max-width: 900px; margin: 0 auto; }
.contest-body .card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.contest-body .card h2 {
    font-size: 1.4em;
    margin: 0 0 16px;
    color: #333;
}
.contest-content { line-height: 1.7; color: #555; }
.contest-prize-main {
    font-size: 1.3em;
    font-weight: 700;
    color: #e65100;
    margin-bottom: 8px;
}
.contest-prize-desc { color: #666; line-height: 1.6; }

/* --- Stages Timeline --- */
.contest-stages-timeline { position: relative; }
.contest-stage {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
    position: relative;
}
.stage-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 44px;
}
.stage-marker-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #888;
    flex-shrink: 0;
    z-index: 1;
}
.stage-marker-line {
    width: 3px;
    flex: 1;
    min-height: 20px;
    background: #e0e0e0;
}
.contest-stage.stage-current .stage-marker-dot {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 3px 12px rgba(102,126,234,0.4);
    animation: stagePulse 2s infinite;
}
@keyframes stagePulse {
    0%, 100% { box-shadow: 0 3px 12px rgba(102,126,234,0.4); }
    50% { box-shadow: 0 3px 20px rgba(102,126,234,0.7); }
}
.contest-stage.stage-submissions .stage-marker-dot { background: #22c55e; color: #fff; }
.contest-stage.stage-voting .stage-marker-dot { background: #f59e0b; color: #fff; }
.contest-stage.stage-ended .stage-marker-dot { background: #a855f7; color: #fff; }
.contest-stage.stage-ended .stage-marker-line,
.contest-stage.stage-submissions .stage-marker-line,
.contest-stage.stage-voting .stage-marker-line { background: #c4b5fd; }

.stage-content {
    flex: 1;
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    margin-bottom: 12px;
}
.contest-stage.stage-current .stage-content { border-color: #667eea; background: #fafafe; }
/* Stage content border colors by status */
.contest-stage.stage-submissions .stage-content { border-color: #a5d6a7; background: #fafff9; }
.contest-stage.stage-voting .stage-content { border-color: #ffcc80; background: #fffdf5; }
.contest-stage.stage-ended .stage-content { border-color: #ce93d8; background: #fdf5ff; }
.contest-stage.stage-upcoming .stage-content { border-color: #e0e0e0; }


.stage-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.stage-name { margin: 0; font-size: 1.15em; color: #333; }
.stage-badge {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
}
.stage-badge-upcoming { background: #e3f2fd; color: #1565c0; }
.stage-badge-submissions { background: #e8f5e9; color: #2e7d32; }
.stage-badge-voting { background: #fff3e0; color: #e65100; }
.stage-badge-ended { background: #f3e5f5; color: #6a1b9a; }

.stage-desc { color: #666; font-size: 0.95em; margin: 4px 0 8px; }
.stage-dates { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #888; margin-bottom: 16px; }

/* --- Upload Form --- */
.stage-upload-form { margin-top: 16px; }
.upload-info { font-size: 14px; color: #666; margin-bottom: 10px; }
.upload-dropzone {
    border: 3px dashed #d0d0d0;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}
.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: #667eea;
    background: #f0f0ff;
}
.dropzone-icon { font-size: 48px; margin-bottom: 12px; }
.dropzone-text { font-size: 15px; color: #555; font-weight: 500; }
.dropzone-hint { font-size: 12px; color: #999; margin-top: 6px; }

.upload-preview {
    position: relative;
    max-width: 400px;
    margin: 10px 0;
    border-radius: 12px;
    overflow: hidden;
}
.upload-preview-img { width: 100%; display: block; border-radius: 12px; }
.upload-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-description {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    margin: 10px 0;
    font-family: inherit;
}

.btn-submit-entry {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-submit-entry:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(102,126,234,0.4); }
.btn-submit-entry:disabled { opacity: 0.5; cursor: not-allowed; }

.stage-upload-locked {
    margin-top: 12px;
    padding: 14px 20px;
    background: #f0f0f0;
    border-radius: 10px;
    color: #666;
    font-weight: 500;
}

.stage-login-notice {
    margin-top: 12px;
    padding: 14px 20px;
    background: #fff3e0;
    border-radius: 10px;
    color: #e65100;
}
.stage-login-notice a { color: #1565c0; font-weight: 600; }

.upload-success {
    padding: 16px 20px;
    background: #e8f5e9;
    border-radius: 10px;
    color: #2e7d32;
    font-weight: 600;
    font-size: 15px;
}

/* --- Gallery --- */
.stage-gallery { margin-top: 20px; }
.gallery-title { font-size: 1em; color: #888; margin: 0 0 14px; font-weight: 600; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.gallery-entry {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}
.gallery-entry:hover { border-color: #667eea; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.gallery-entry.entry-voted { border-color: #22c55e; background: #f0fff4; }

.entry-image-wrap { position: relative; }
.entry-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    display: block;
}
.entry-rank {
    position: absolute;
    top: 8px;
    right: 8px;
}
.rank-medal { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

.entry-info { padding: 12px; }
.entry-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.entry-author-avatar { width: 28px; height: 28px; border-radius: 50%; }
.entry-author-name { font-size: 13px; font-weight: 600; color: #333; text-decoration: none; }
.entry-author-name:hover { color: #667eea; }
.entry-desc { font-size: 12px; color: #888; margin-bottom: 8px; line-height: 1.4; }

.entry-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.entry-votes-count {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}
.btn-vote {
    padding: 6px 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-vote:hover:not(:disabled) { transform: scale(1.05); }
.btn-vote:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-vote.voted { background: #22c55e; }
.vote-done { font-size: 13px; color: #22c55e; font-weight: 600; }

.stage-no-entries { margin-top: 12px; padding: 14px; color: #999; font-size: 14px; text-align: center; }

/* --- Lightbox --- */
.contest-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}
.contest-lightbox.active { opacity: 1; }
.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

/* --- Archive / Listing --- */
/* === CONTEST CARDS REDESIGN === */
.contests-archive { max-width: 1100px; margin: 0 auto; padding: 20px; }
.contests-hero {
    text-align: center;
    padding: 50px 20px 40px;
    margin-bottom: 30px;
}
.contests-hero h1 {
    font-size: 2.4em;
    margin: 0 0 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.contests-hero p { color: #888; font-size: 1.1em; margin: 0; }

.contests-section { margin-bottom: 48px; }
.contests-section-title {
    font-size: 1.4em;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.contest-card {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.35s cubic-bezier(.22,.68,0,1.2), box-shadow 0.35s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}
.contest-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
}
.contest-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.04);
    pointer-events: none;
}

.contest-card-header {
    padding: 36px 24px 28px;
    color: #fff;
    position: relative;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}
.contest-card-header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.contest-card-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
    pointer-events: none;
}

.contest-card-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.25;
    transition: opacity 0.3s, transform 0.6s;
}
.contest-card:hover .contest-card-thumb {
    opacity: 0.35;
    transform: scale(1.05);
}

.contest-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255,255,255,0.15);
    z-index: 2;
}

.contest-card-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 800;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    line-height: 1.3;
}

.contest-card-body {
    padding: 18px 22px 20px;
}
.contest-card-excerpt {
    color: #555;
    font-size: 14px;
    margin: 0 0 12px;
    line-height: 1.5;
}
.contest-card-meta {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.contest-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f7;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
}
.contest-card-prize {
    font-size: 14px;
    color: #e65100;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.contest-card-deadline {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}
.contest-card-winner {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.contest-card-winner span {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

/* Active card pulse effect */
.contest-card-active {
    animation: card-glow 3s ease-in-out infinite;
}
@keyframes card-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
    50% { box-shadow: 0 4px 30px rgba(102,126,234,0.15), 0 2px 10px rgba(0,0,0,0.04); }
}
.contest-card-active:hover {
    animation: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
}

/* Ended card — muted but elegant */
.contest-card-ended .contest-card-header {
    filter: saturate(0.6);
}
.contest-card-ended:hover .contest-card-header {
    filter: saturate(0.8);
}

/* Upcoming — subtle dashed border */
.contest-card-upcoming {
    border: 2px dashed #e0e0e0;
    background: #fafafa;
}
.contest-card-upcoming .contest-card-header {
    opacity: 0.85;
}

.contests-empty {
    text-align: center;
    padding: 100px 20px;
    color: #999;
}
.contests-empty-icon { font-size: 72px; margin-bottom: 20px; }
.contests-empty h2 { color: #555; font-weight: 700; }


/* Contest Card Mosaic */
.contest-card-mosaic {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    opacity: 0.35;
    transition: opacity 0.4s;
    z-index: 0;
}
.contest-card:hover .contest-card-mosaic {
    opacity: 0.5;
}
.mosaic-piece {
    overflow: hidden;
    position: relative;
}
.mosaic-piece img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s;
}
.contest-card:hover .mosaic-piece img {
    transform: scale(1.08);
}
/* If only 1 image — full cover */
.contest-card-mosaic:has(.mosaic-piece:only-child) {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
/* If 2 images — 2 columns */
.contest-card-mosaic:has(.mosaic-piece:nth-child(2):last-child) {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}
/* If 3 images — 3 columns 1 row */
.contest-card-mosaic:has(.mosaic-piece:nth-child(3):last-child) {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr;
}
/* If 4 images — 2x2 */
.contest-card-mosaic:has(.mosaic-piece:nth-child(4):last-child) {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
/* Ended card — desaturate mosaic */
.contest-card-ended .contest-card-mosaic {
    filter: saturate(0.5);
    opacity: 0.3;
}

@media (max-width: 768px) {
    .contests-grid { grid-template-columns: 1fr; gap: 20px; }
    .contests-hero h1 { font-size: 1.8em; }
    .contest-card-header { min-height: 140px; padding: 28px 20px 22px; }
    .contest-card-title { font-size: 1.2em; }
    .contest-card-body { padding: 14px 18px 16px; }
}


/* --- Contest Mobile --- */
@media (max-width: 768px) {
    .contest-hero { padding: 30px 20px; border-radius: 14px; }
    .contest-title { font-size: 1.5em; }
    .contest-hero-stats { gap: 16px; }
    .contest-stat-num { font-size: 1.3em; }
    .contest-body .card { padding: 18px; border-radius: 12px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .entry-info { padding: 8px; }
    .entry-author-avatar { width: 22px; height: 22px; }
    .stage-content { padding: 14px; }
    .stage-dates { flex-direction: column; gap: 4px; }
    .upload-dropzone { padding: 30px 15px; }
    .dropzone-icon { font-size: 36px; }
}

/* =============================================
   КАБИНЕТ — ВКЛАДКА КОНКУРСЫ
   ============================================= */
.cab-contest-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    border: 2px solid #f0f0f0;
    transition: border-color 0.3s;
}
.cab-contest-card:hover { border-color: #667eea; }

.cab-contest-header {
    padding: 20px 24px;
    color: #fff;
    position: relative;
}
.cab-contest-badge {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
.cab-contest-title {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
}
.cab-contest-title a {
    color: #fff;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.cab-contest-title a:hover { text-decoration: underline; }
.cab-contest-date {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 6px;
}

.cab-contest-body { padding: 20px 24px; }

/* Stats row */
.cab-contest-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cab-stat { text-align: center; }
.cab-stat-val {
    display: block;
    font-size: 1.5em;
    font-weight: 800;
    color: #333;
    line-height: 1.2;
}
.cab-stat-lbl { font-size: 12px; color: #888; }

/* Stages progress */
.cab-stages-progress {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.cab-stage-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f5f5f5;
    border-radius: 10px;
    flex: 1;
    min-width: 140px;
    border: 2px solid transparent;
    transition: all 0.3s;
}
.cab-stage-item.cab-stage-active {
    border-color: #667eea;
    background: #f0f0ff;
}
.cab-stage-item.cab-stage-done { background: #f0fff0; }

.cab-stage-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
}
.cab-stage-dot.filled { background: #22c55e; color: #fff; }
.cab-stage-dot.partial { background: #f59e0b; color: #fff; }
.cab-stage-active .cab-stage-dot { background: #667eea; color: #fff; }

.cab-stage-name { font-size: 13px; font-weight: 600; color: #333; }
.cab-stage-meta { font-size: 12px; color: #888; }
.cab-stage-action { color: #667eea; font-weight: 600; }

/* My entries thumbnails */
.cab-my-entries { margin-bottom: 20px; }
.cab-my-entries-label { font-size: 13px; color: #888; font-weight: 600; margin-bottom: 10px; }
.cab-my-entries-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cab-entry-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}
.cab-entry-thumb:hover { border-color: #667eea; transform: scale(1.05); }
.cab-entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cab-entry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cab-entry-votes { font-size: 11px; color: #fff; font-weight: 600; }
.cab-entry-status-badge { font-size: 12px; }
.cab-entry-status-badge.pending { }
.cab-entry-status-badge.rejected { }

/* Buttons */
.cab-contest-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cab-contest-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.cab-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.cab-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(102,126,234,0.4); color: #fff; }
.cab-btn-upload {
    background: #e8f5e9;
    color: #2e7d32;
}
.cab-btn-upload:hover { background: #c8e6c9; color: #1b5e20; }
.cab-btn-vote {
    background: #fff3e0;
    color: #e65100;
}
.cab-btn-vote:hover { background: #ffe0b2; color: #bf360c; }

/* Empty state */
.cabinet-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* Mobile */
@media (max-width: 768px) {
    .cab-contest-header { padding: 16px; }
    .cab-contest-title { font-size: 1.1em; }
    .cab-contest-body { padding: 14px; }
    .cab-contest-stats { gap: 16px; }
    .cab-stat-val { font-size: 1.2em; }
    .cab-stages-progress { flex-direction: column; }
    .cab-stage-item { min-width: 0; }
    .cab-entry-thumb { width: 64px; height: 64px; }
    .cab-contest-actions { flex-direction: column; }
    .cab-contest-btn { justify-content: center; }
}

/* =============================================
   УВЕДОМЛЕНИЯ
   ============================================= */

/* Bell button */
.header-notifications {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.notif-bell {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s;
}
.notif-bell:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(102,126,234,0.3);
}
.notif-bell svg { width: 20px; height: 20px; }

/* Badge */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: notifPulse 2s infinite;
    box-shadow: 0 2px 6px rgba(239,68,68,0.4);
}
@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Dropdown */
.notif-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 380px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 10001;
    overflow: hidden;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
}
.notif-dropdown-title {
    font-weight: 700;
    font-size: 15px;
    color: #333;
}
.notif-mark-all {
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-dropdown-list {
    overflow-y: auto;
    max-height: 380px;
    flex: 1;
}

.notif-dropdown-footer {
    padding: 10px 18px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}
.notif-dropdown-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.notif-dropdown-footer a:hover { text-decoration: underline; }

/* Notification item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f8f8f8;
    position: relative;
}
.notif-item:hover { background: #f8f8ff; }
.notif-item.notif-unread {
    background: linear-gradient(135deg, rgba(102,126,234,0.04), rgba(118,75,162,0.04));
}

.notif-left { flex-shrink: 0; }
.notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.notif-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.notif-content { flex: 1; min-width: 0; }
.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
}
.notif-message {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-empty, .notif-loading {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.notif-load-more {
    display: block;
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    border-top: 1px solid #f0f0f0;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.notif-load-more:hover { background: #f8f8ff; }

/* Cabinet notifications tab */
.cab-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.cab-notif-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cab-notif-filter {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
}
.cab-notif-filter:hover, .cab-notif-filter.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
}

.cab-notif-list { }
.cab-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}
.cab-notif-item:hover { border-color: #667eea; transform: translateX(4px); }
.cab-notif-item.unread {
    background: linear-gradient(135deg, rgba(102,126,234,0.04), rgba(118,75,162,0.04));
    border-color: #e0e0ff;
}
.cab-notif-item .notif-avatar { width: 44px; height: 44px; }
.cab-notif-item .notif-icon-circle { width: 44px; height: 44px; font-size: 22px; }
.cab-notif-item .notif-title { font-size: 14px; }
.cab-notif-item .notif-message { font-size: 13px; white-space: normal; }
.cab-notif-item .notif-time { font-size: 12px; }

/* Mobile */
@media (max-width: 768px) {
    .notif-dropdown {
        top: 60px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 70vh;
        border-radius: 14px;
    }
    .notif-bell { width: 34px; height: 34px; }
    .notif-bell svg { width: 18px; height: 18px; }
    .cab-notif-item { padding: 12px; gap: 10px; }
}

/* =============================================
   ЧАТ: Typing индикатор
   ============================================= */
.msg-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #888;
    font-size: 13px;
    font-style: italic;
}
.typing-dots {
    display: flex;
    gap: 3px;
    align-items: center;
}
.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
.typing-text { color: #999; }

/* Новые сообщения — мягкое появление */
.msg-bubble {
    animation: msgFadeIn 0.3s ease;
}
@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Load More Button */
.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.btn-load-more:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Participants limit notice */
.stage-upload-locked[style*='ff6b6b'] {
    animation: pulse-red 2s ease-in-out infinite;
}
@keyframes pulse-red {
    0%, 100% { border-color: #ff6b6b; }
    50% { border-color: #ff3333; box-shadow: 0 0 15px rgba(255, 107, 107, 0.3); }
}

/* Delete Dialog Button */
.msg-delete-dialog-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0.4;
    transition: all 0.2s ease;
}
.msg-delete-dialog-btn:hover {
    opacity: 1;
    background: rgba(255, 0, 0, 0.1);
}
.msg-conversation-header .msg-delete-dialog-btn {
    margin-left: auto;
    font-size: 18px;
}
.msg-dialog-item .msg-delete-dialog-list {
    display: block;
    margin-top: 4px;
    font-size: 14px;
}

/* Password Strength Indicator */
.pwd-strength-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.pwd-strength-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}
.pwd-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width .3s, background .3s;
}
.pwd-strength-text {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}
.pwd-requirements small {
    color: #888;
    font-size: 12px;
}


/* ============================================
   RESPONSIVE — COMPLETE OVERHAUL
   ============================================ */

/* === Large laptop (1280-1400px) === */
@media (max-width: 1500px) {
    .fortune-wheel-btn {
        padding: 0 !important; width: 36px; height: 36px;
        border-radius: 50% !important; font-size: 18px;
        background: linear-gradient(135deg, #f5576c, #feca57) !important;
        animation: none !important; box-shadow: 0 2px 8px rgba(245,87,108,0.3) !important;
    }
    .fortune-wheel-btn::before { display: none !important; }
    .fortune-text { display: none !important; }
    .fortune-icon { animation: none !important; font-size: 18px; }
    .header-search input { width: 120px; }
    .header-search input:focus { width: 150px; }
    .header-nav { gap: 3px; }
    .header-nav > li > a { padding: 0 10px; font-size: 10px; }
    .header-right { gap: 8px; }
    .user-btn { font-size: 10px; padding: 0 10px; }
    .user-link { font-size: 10px; }
}

/* === Laptop screens (1100-1280px, e.g. MacBook 13") === */
@media (max-width: 1280px) {
    .header-inner { max-width: 100%; padding: 0 16px; gap: 8px; }
    .header-nav { gap: 4px; }
    .header-nav > li > a {
        font-size: 10px;
        padding: 0 10px;
        height: 34px;
        letter-spacing: 0.2px;
    }
    .header-search input { width: 130px; font-size: 11px; }
    .header-search input:focus { width: 160px; }
    .user-link, .user-btn { font-size: 10px; padding: 0 10px; height: 34px; }
    .user-link { max-width: 50px; }
    .user-link span:not(.header-avatar-wrap) { display: none; }
    .fortune-wheel-btn { font-size: 10px; padding: 0 10px; height: 34px; }
    .fortune-text { display: none; }
    .user-btn { font-size: 9px; padding: 0 8px; }
    .header-right { gap: 8px; }

    .site-logo .logo-name { font-size: 28px; }
    .site-logo .logo-sub { font-size: 9px; letter-spacing: 1.5px; }
    .logo-mark { width: 56px; height: 56px; border-radius: 16px; }
    .logo-mark svg { width: 48px; height: 48px; }
    .header-inner { height: 64px; }

    .site-content { max-width: 100%; padding: 0 20px; }
    .authors-section { max-width: 100%; padding: 0 20px; }
    .authors-gallery { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
    .footer-inner { max-width: 100%; padding: 0 20px; gap: 30px; }
    .footer-bottom { padding: 20px 20px 0; }

    .hero-banner h1 { font-size: 36px; }
    .hero-banner p { font-size: 16px; }
    .hero-banner { padding: 50px 20px; }
}

/* === Small laptop / large tablet (900-1100px) === */
@media (max-width: 1100px) {
    /* Switch to burger menu */
    .mobile-menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: #fff;
        box-shadow: 0 12px 30px rgba(0,0,0,0.15);
        padding: 16px 0; z-index: 99;
        border-radius: 0 0 16px 16px;
        border-top: 2px solid #f0f0f0;
        max-height: 80vh;
        overflow-y: auto;
    }
    .main-nav.nav-open { display: block; }
    .main-nav.nav-open .header-nav { display: flex; flex-direction: column; }
    .header-nav { flex-direction: column; gap: 0; }
    .header-nav > li > a {
        padding: 14px 24px !important; border-radius: 0 !important;
        background: none !important; animation: none !important;
        box-shadow: none !important; color: #444 !important;
        font-size: 15px !important; height: auto !important;
        justify-content: flex-start !important;
        text-align: left !important;
        border-bottom: 1px solid #f5f5f5;
        white-space: normal !important;
    }
    .header-nav > li:last-child > a { border-bottom: none; }
    .header-nav > li { text-align: left !important; }
    .header-nav { align-items: stretch !important; }
    .header-nav > li > a::before { display: none !important; }
    .header-nav > li > a:hover { 
        color: var(--primary) !important; 
        background: rgba(255,107,107,0.06) !important; 
    }
    .header-nav > li.current-menu-item > a,
    .header-nav > li.current-cat > a {
        color: var(--primary) !important;
        background: rgba(255,107,107,0.08) !important;
    }

    .header-inner { height: 60px; }
    .header-search { display: none; }

    .authors-gallery { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }

    .mega-dropdown {
        position: static !important;
        transform: none !important;
        opacity: 0; visibility: hidden;
        pointer-events: none;
        max-height: 0; overflow: hidden;
        transition: all 0.3s;
    }
    .has-dropdown:hover > .mega-dropdown {
        opacity: 1; visibility: visible;
        pointer-events: all; max-height: 1000px;
    }
    .mega-dropdown::before { display: none; }
    .dropdown-inner {
        flex-direction: column; min-width: 100%;
        border-radius: 0; box-shadow: none;
        border-top: 1px solid #f0f0f0;
    }
    .dropdown-col + .dropdown-col {
        border-left: none; border-top: 1px solid #f3f3f5;
    }
    .dropdown-promo { width: 100%; }
    .dropdown-promo-card { border-radius: 0; padding: 24px; }
}

/* === Tablet (768-900px) === */
@media (max-width: 900px) {
    .content-with-sidebar { flex-direction: column; }
    .sidebar { width: 100%; }
    .hero-banner h1 { font-size: 28px; }
    .hero-banner { padding: 40px 20px; }
    .hero-features { flex-direction: column; align-items: center; gap: 10px; }
    .single-post-content { padding: 24px; }
    .cabinet-container { flex-direction: column; }
    .cabinet-sidebar { width: 100%; }
    .cabinet-nav { display: flex; flex-wrap: wrap; }
    .cabinet-nav-item {
        flex: 1; min-width: 120px; text-align: center;
        justify-content: center; border-bottom: none;
    }
    .profile-info-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 24px; }
    .contest-single-title { font-size: 26px; }
    .contest-single-body { padding: 24px; }
    .contest-single-meta { gap: 16px; }
    .contest-prize-block { flex-direction: column; text-align: center; }
    .contest-submission-section { padding: 24px; }
    .submissions-gallery { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .submissions-featured { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .cabinet-submission-item { flex-wrap: wrap; }
    .cabinet-submission-status { width: 100%; margin-top: 8px; }

    .site-logo .logo-name { font-size: 26px; }
    .logo-mark { width: 50px; height: 50px; }
    .logo-mark svg { width: 42px; height: 42px; }
}

/* === Mobile (max 600px) === */
@media (max-width: 600px) {
    .header-inner { height: 54px; padding: 0 12px; }
    .site-logo .logo-name { font-size: 22px; }
    .site-logo .logo-sub { display: none; }
    .logo-mark { width: 44px; height: 44px; border-radius: 12px; }
    .logo-mark svg { width: 36px; height: 36px; }
    .site-logo a { gap: 8px; }

    .hero-banner h1 { font-size: 22px; }
    .hero-banner p { font-size: 14px; }
    .hero-banner { padding: 32px 16px; }
    .hero-feature { font-size: 12px; padding: 6px 14px; }

    .user-btn { display: none; }
    .user-link { font-size: 9px; padding: 0 8px; height: 32px; }
    .fortune-wheel-btn { display: none; }
    .header-right { gap: 6px; }

    .site-content { padding: 0 12px; margin-bottom: 24px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .authors-section { padding: 0 12px; margin-bottom: 30px; }
    .authors-gallery { grid-template-columns: 1fr; gap: 16px; }
    .author-artwork { padding-top: 60%; }

    .section-title { font-size: 20px; }

    .contests-grid { grid-template-columns: 1fr; }
    .contests-section { padding: 20px 12px; }
    .contacts-grid { grid-template-columns: 1fr; }
    .contacts-inner { padding: 0 12px; }

    .footer-inner { grid-template-columns: 1fr; gap: 20px; padding: 0 16px; }
    .footer-bottom { padding: 16px 16px 0; }
    .footer-logo { font-size: 22px; }

    .ad-zone { padding: 10px 12px; }
    .top-bar { font-size: 11px; padding: 6px 12px; }
}

/* === Very small mobile (max 380px) === */
@media (max-width: 380px) {
    .header-inner { padding: 0 8px; gap: 6px; }
    .site-logo .logo-name { font-size: 20px; }
    .logo-mark { width: 40px; height: 40px; }
    .logo-mark svg { width: 34px; height: 34px; }
    .hero-banner h1 { font-size: 19px; }
    .product-grid { grid-template-columns: 1fr; gap: 16px; }
    .user-link span:not(.emoji) { display: none; }
}

/* Mobile nav extras — hidden on desktop */
.mobile-nav-extras {
    display: none !important;
}
@media (max-width: 1100px) {
    .mobile-nav-extras {
        display: block;
        padding: 12px 20px 8px;
        border-top: 2px solid #f0f0f0;
        margin-top: 8px;
    }
    .mobile-nav-fortune {
        display: block;
        text-align: center;
        padding: 12px 20px;
        background: linear-gradient(135deg, #f5576c, #ff9a9e, #feca57);
        background-size: 200% 200%;
        animation: fortune-gradient 3s ease infinite;
        color: #fff !important;
        font-weight: 800;
        font-size: 15px;
        border-radius: 12px;
        text-decoration: none;
        margin-bottom: 12px;
        letter-spacing: 0.5px;
    }
    .mobile-nav-search {
        display: flex;
        gap: 0;
    }
    .mobile-nav-search input {
        flex: 1;
        padding: 10px 14px;
        border: 2px solid #eee;
        border-right: none;
        border-radius: 10px 0 0 10px;
        font-size: 14px;
        outline: none;
        font-family: inherit;
    }
    .mobile-nav-search input:focus {
        border-color: var(--primary);
    }
    .mobile-nav-search button {
        padding: 10px 16px;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 0 10px 10px 0;
        font-size: 16px;
        cursor: pointer;
    }
}

/* Mobile header layout fix */
@media (max-width: 1100px) {
    .header-inner {
        justify-content: space-between;
    }
    .site-logo {
        order: 1;
    }
    .main-nav {
        order: 4;
    }
    .header-right {
        order: 2;
        margin-left: auto;
    }
    .mobile-menu-toggle {
        order: 3;
    }
}

/* ========== Likes ========== */
.post-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    transition: all 0.3s;
    font-family: inherit;
}
.like-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: scale(1.05);
}
.like-btn.liked {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 12px rgba(255,107,107,0.3);
}
.like-btn.liked .like-icon {
    fill: #fff;
    stroke: #fff;
}
.like-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: all 0.3s;
}
.like-btn.liked .like-icon,
.like-btn:hover .like-icon {
    fill: currentColor;
}
.like-btn.like-animate {
    animation: likePopAnimation 0.4s ease;
}
@keyframes likePopAnimation {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.post-views {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #aaa;
    font-size: 14px;
}
/* Like button in cards (compact) */
.card-like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 20px;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 600;
}
.card-like-btn:hover { color: #ff6b6b; }
.card-like-btn.liked { color: #ff6b6b; }
.card-like-btn.liked .like-icon { fill: #ff6b6b; stroke: #ff6b6b; }
.card-like-btn .like-icon { width: 16px; height: 16px; }

/* ========== Comments ========== */
.comments-wrap {
    margin-top: 40px;
}
.comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}
.comments-title svg { stroke: var(--primary); flex-shrink: 0; }

/* Comment list */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-item {
    margin-bottom: 0;
}
.comment-body {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    border: 1px solid #f0f0f0;
    transition: all 0.2s;
}
.comment-body:hover {
    border-color: #e0e0e0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.comment-avatar {
    position: relative;
    flex-shrink: 0;
}
.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}
.comment-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #1dd1a1;
    border-radius: 50%;
    border: 2px solid #fff;
}
.comment-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.comment-author-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-author-name a {
    color: var(--dark);
    text-decoration: none;
}
.comment-author-name a:hover { color: var(--primary); }
.comment-author-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}
.comment-date {
    font-size: 13px;
    color: #aaa;
}
.comment-content {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}
.comment-content p { margin: 0 0 8px; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-moderation {
    background: #fff9c4;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #e67e22;
    border-left: 3px solid #e67e22;
}
.comment-actions {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}
.comment-actions a,
.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #aaa;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s;
    font-weight: 600;
}
.comment-actions a:hover,
.comment-reply-link:hover {
    color: var(--primary);
    background: rgba(255,107,107,0.06);
}

/* Nested comments */
.comment-list .children {
    list-style: none;
    padding-left: 32px;
    margin: 0;
    border-left: 2px solid #f0f0f0;
}
@media (max-width: 600px) {
    .comment-list .children { padding-left: 16px; }
}

/* Comment form */
.comment-form-wrap {
    margin-top: 32px;
}
.comment-form-wrap h3,
#reply-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
}
#reply-title svg { stroke: var(--primary); }
#reply-title small {
    font-size: 13px;
    font-weight: 400;
}
#reply-title small a {
    color: var(--primary);
    text-decoration: none;
}
.comment-logged-in {
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 10px;
}
.comment-logged-in a {
    color: var(--primary);
    text-decoration: none;
    margin-left: 8px;
}
.comment-field {
    margin-bottom: 16px;
}
.comment-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.comment-field input,
.comment-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    outline: none;
}
.comment-field input:focus,
.comment-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
    background: #fff;
}
.comment-field textarea {
    resize: vertical;
    min-height: 120px;
}
.comment-field-half {
    display: inline-block;
    width: calc(50% - 8px);
    margin-right: 16px;
    vertical-align: top;
}
.comment-field-half:last-of-type { margin-right: 0; }
@media (max-width: 600px) {
    .comment-field-half { width: 100%; margin-right: 0; }
}
.comment-submit-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}
.comment-submit-btn {
    background: linear-gradient(135deg, var(--primary), #ee5a24);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}
.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}
.comments-closed {
    text-align: center;
    color: #aaa;
    font-style: italic;
    padding: 20px;
}
.comment-navigation {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
}
.comment-navigation a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ===== GALLERY PAGE ===== */
.gallery-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.gallery-hero {
    text-align: center;
    padding: 50px 20px 30px;
}

.gallery-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 10px;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0;
}

/* Filters */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 10px 30px;
}

.gallery-filter {
    padding: 8px 18px;
    border: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.25s ease;
}

.gallery-filter:hover {
    border-color: #e8573d;
    color: #e8573d;
}

.gallery-filter.active {
    background: linear-gradient(135deg, #e8573d, #f7a072);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(232,87,61,0.3);
}

/* Masonry Grid */
.gallery-masonry {
    columns: 4;
    column-gap: 16px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item-inner {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #f3f4f6;
}

.gallery-img {
    width: 100%;
    display: block;
    border-radius: 16px;
    transition: transform 0.4s ease, filter 0.4s ease;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.4s ease;
}

.gallery-img.loaded {
    opacity: 1;
}

.gallery-item-inner:hover .gallery-img {
    transform: scale(1.05);
    filter: brightness(0.75);
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gallery-item-inner:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    font-weight: 600;
}

.gallery-item-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.gallery-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.gallery-zoom,
.gallery-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.gallery-zoom:hover,
.gallery-link:hover {
    background: rgba(255,255,255,0.4);
}

/* Empty */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 1.1rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease;
}

.lightbox-caption {
    color: #fff;
    font-size: 1rem;
    margin-top: 12px;
    text-align: center;
    font-weight: 500;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}

/* ===== GALLERY RESPONSIVE ===== */
@media (max-width: 1200px) {
    .gallery-masonry { columns: 3; }
}

@media (max-width: 900px) {
    .gallery-masonry { columns: 2; }
    .gallery-title { font-size: 1.8rem; }
    .gallery-hero { padding: 30px 10px 20px; }
}

@media (max-width: 600px) {
    .gallery-masonry { columns: 2; column-gap: 10px; }
    .gallery-item { margin-bottom: 10px; }
    .gallery-filter { padding: 6px 14px; font-size: 0.82rem; }
    .gallery-title { font-size: 1.5rem; }
    .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 1.4rem; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 380px) {
    .gallery-masonry { columns: 1; }
}


/* Gallery item author & technique */
.gallery-item-author,
.gallery-item-technique {
    font-size: 0.8rem;
    opacity: 0.85;
    display: block;
}


/* ===== PROFILE GALLERY GRID ===== */
.profile-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.profile-gallery-item {
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
}

.profile-gallery-img-wrap {
    position: relative;
    overflow: hidden;
}

.profile-gallery-img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.profile-gallery-img-wrap:hover .profile-gallery-img {
    transform: scale(1.05);
}

.profile-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 12px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-gallery-img-wrap:hover .profile-gallery-overlay {
    opacity: 1;
}

.profile-gallery-cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
}

.profile-gallery-title {
    font-size: 0.95rem;
    margin: 4px 0 2px;
    font-weight: 600;
}

.profile-gallery-tech {
    font-size: 0.8rem;
    opacity: 0.8;
}

.profile-gallery-all-link {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(135deg, #e8573d, #f7a072);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-gallery-all-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232,87,61,0.3);
    color: #fff;
}

/* Gallery author link in gallery page */
.gallery-item-author a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.5);
    transition: border-color 0.2s;
}

.gallery-item-author a:hover {
    border-bottom-color: #fff;
}

/* Illustrator card link */
.author-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.author-card-link:hover {
    transform: translateY(-4px);
}

.author-card-link .author-card {
    cursor: pointer;
}

/* Profile stat for gallery works */
.profile-stat-gallery {
    color: #e8573d;
}

@media (max-width: 600px) {
    .profile-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Illustrator card - user avatar fallback */
.artwork-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 180px;
}
.artwork-user-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Illustrator card - split zones */
.author-info-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.author-info-link:hover .author-info {
    background: #fafafa;
}
.author-info-link:hover .author-name {
    color: #e8573d;
}
.author-artwork:hover {
    opacity: 0.95;
}
.author-artwork .like-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 4px 12px;
    color: #fff;
    font-size: 0.85rem;
}
.author-artwork .like-btn.liked {
    background: rgba(232,87,61,0.8);
    color: #fff;
}

/* Illustrator Lightbox */
.ill-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.ill-lightbox.active {
    opacity: 1;
    visibility: visible;
}
.ill-lightbox-close {
    position: absolute;
    top: 15px; right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ill-lightbox-close:hover {
    background: rgba(255,255,255,0.1);
}
.ill-lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}
#ill-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.ill-lightbox-caption {
    color: #fff;
    font-size: 1rem;
    margin-top: 12px;
    font-weight: 500;
}

/* Like button inside illustrator artwork overlay */
.artwork-overlay .like-btn {
    background: rgba(255,255,255,0.25) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.4) !important;
    border-radius: 20px !important;
    padding: 5px 14px !important;
    color: #fff !important;
    font-size: 0.85rem !important;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.artwork-overlay .like-btn:hover {
    background: rgba(255,255,255,0.4) !important;
}
.artwork-overlay .like-btn.liked {
    background: rgba(232,87,61,0.85) !important;
    border-color: rgba(232,87,61,0.9) !important;
    color: #fff !important;
}
.artwork-overlay .like-btn .like-icon {
    fill: #fff;
    stroke: #fff;
    width: 16px;
    height: 16px;
}
.artwork-overlay .like-btn.liked .like-icon {
    fill: #fff;
}

/* Like button inside gallery overlay */
.gallery-item-actions .like-btn {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0 !important;
    min-width: 38px;
}
.gallery-item-actions .like-btn:hover {
    background: rgba(255,255,255,0.4) !important;
}
.gallery-item-actions .like-btn.liked {
    background: rgba(232,87,61,0.85) !important;
    border-color: rgba(232,87,61,0.9) !important;
}
.gallery-item-actions .like-btn .like-icon {
    fill: #fff;
    stroke: #fff;
    width: 18px;
    height: 18px;
}
.gallery-item-actions .like-btn .like-count {
    display: none;
}

/* ===== ANIMATED LOGO TEXT ===== */
.logo-art {
    background: linear-gradient(90deg, #ff6b6b, #ff9a56, #feca57, #ff6b6b, #ee5a24, #ff6b6b) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: logo-flow 3s linear infinite !important;
    position: relative;
}

.logo-color {
    background: linear-gradient(90deg, #6c5ce7, #a855f7, #48dbfb, #1dd1a1, #6c5ce7, #a855f7) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: logo-flow 3s linear infinite !important;
    animation-delay: -1.5s !important;
}

@keyframes logo-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Hover: speed up + glow */
.site-logo a:hover .logo-art,
.site-logo a:hover .logo-color {
    animation-duration: 1s !important;
}

.site-logo a:hover .logo-name {
    text-shadow: 0 0 20px rgba(168,85,247,0.3), 0 0 40px rgba(255,107,107,0.2);
    filter: brightness(1.1);
}

/* Subtle bounce on load */
.logo-name {
    animation: logo-appear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes logo-appear {
    0% { opacity: 0; transform: translateY(-10px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo sub text fade in */
.site-logo .logo-sub {
    animation: logo-sub-appear 1s ease 0.3s both;
}

@keyframes logo-sub-appear {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* FORCE compact online block */
.footer-online {
    max-width: 500px !important;
    margin: 0 auto 12px !important;
    padding: 0 20px !important;
}
.footer-online .online-block {
    padding: 10px 16px !important;
    border-radius: 10px !important;
}
.footer-online .online-header {
    margin-bottom: 4px !important;
    font-size: 13px !important;
}
.footer-online .online-guests,
.footer-online .online-login-hint {
    font-size: 12px !important;
    padding: 4px 0 !important;
}

/* ============================================
   Search Results Styles
   ============================================ */
.search-section {
    margin-bottom: 32px;
}
.search-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.search-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.search-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.search-user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.search-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.search-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.search-user-name {
    font-weight: 600;
    font-size: 15px;
}
.search-user-meta {
    font-size: 12px;
    color: var(--text-secondary);
}
.search-result-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 4px;
}

/* Footer collaboration text */
.footer-collab-text {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

/* ============================================
   Language Switcher
   ============================================ */

/* SVG flag icons for language switcher */
.lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 0 1px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.lang-switcher {
    position: relative;
    z-index: 1000;
}
.lang-current {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f5;
    border: 1px solid #e0e0e5;
    color: #555;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}
.lang-current:hover {
    background: #e4e4ec;
}
.lang-arrow {
    font-size: 10px;
    opacity: 0.7;
}
.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 6px;
    z-index: 1001;
}
.lang-dropdown-inner {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 100px;
    overflow: hidden;
}
.lang-switcher.open .lang-dropdown {
    display: block;
}
.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
    white-space: nowrap;
}
.lang-dropdown a:hover {
    background: #f0f0ff;
}
.lang-dropdown a.active {
    background: #f0f0ff;
    font-weight: 700;
    color: var(--accent, #667eea);
}
@media (max-width: 768px) {
    
/* SVG flag icons for language switcher */
.lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 0 1px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.lang-switcher {
        margin-left: 8px;
    }
    .lang-current {
        padding: 4px 8px;
        font-size: 12px;
    }
}


/* ============================================
   Large screen optimizations (1600px+)
   ============================================ */
@media (min-width: 1600px) {
    .header-nav > li > a {
        font-size: 11px;
        padding: 0 13px;
        height: 36px;
        border-radius: 18px;
    }

    .logo-mark {
        width: 68px;
        height: 68px;
    }
    .logo-mark svg {
        width: 60px;
        height: 60px;
    }
    .header-inner {
        height: 68px;
        gap: 14px;
    }
    .hero-banner {
        padding: 60px 20px;
    }
    .hero-banner h1 {
        font-size: 48px;
    }
    .hero-banner p {
        font-size: 20px;
    }
    .hero-features {
        gap: 36px;
    }
    .section-title {
        font-size: 26px;
    }
    .illustrators-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    .user-btn, .user-link {
        font-size: 12px;
        padding: 0 16px;
        height: 40px;
    }
}

/* Extra-large screens (1800px+) */
@media (min-width: 1800px) {
    .header-inner {
        max-width: 1860px;
        height: 72px;
        gap: 16px;
    }
    .logo-mark {
        width: 72px;
        height: 72px;
    }
    .logo-mark svg {
        width: 64px;
        height: 64px;
    }
    .site-content,
    .authors-section,
    .contests-section,
    .thirdparty-section,
    .reviews-section,
    .showcase-section {
        max-width: 1720px;
    }
    .header-nav > li > a {
        font-size: 12px;
        padding: 0 16px;
    }

    .illustrators-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 28px;
    }
}

/* Highlight user's own contest entries */
.gallery-entry.entry-own {
    border: 2px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
    position: relative;
}
.gallery-entry.entry-own::after {
    content: '✨ Моя работа';
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== Comment Form Styled ===== */
.comment-form-wrap {
    margin-top: 40px;
}
.comment-form-wrap #reply-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}
.comment-form-wrap #reply-title svg {
    stroke: var(--primary);
    flex-shrink: 0;
}
.comment-form-wrap #reply-title small {
    font-size: 13px;
    font-weight: 600;
}
.comment-form-wrap #reply-title small a {
    color: var(--primary);
    text-decoration: none;
    margin-left: 4px;
}
.comment-form-wrap #reply-title small a:hover {
    color: var(--primary-dark);
}
.comment-form-styled {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 1px solid #eee;
}
.comment-form-styled .comment-logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8f9fc, #eef0ff);
    border-radius: 14px;
    border: 1px solid #e4e7f0;
}
.comment-form-styled .comment-logged-in strong {
    color: var(--dark);
    font-weight: 800;
}
.comment-form-styled .comment-logged-in a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.comment-form-styled .comment-logged-in a:hover {
    color: var(--primary);
}
/* Turnstile */
.comment-form-styled .cf-turnstile {
    margin: 0 0 20px !important;
    padding: 12px 16px;
    background: #fafbfc;
    border-radius: 14px;
    border: 1px solid #eee;
    display: inline-block;
}
/* Comment field */
.comment-form-styled .comment-field {
    margin-bottom: 20px;
}
.comment-form-styled .comment-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: 0;
}
.comment-form-styled .comment-field input,
.comment-form-styled .comment-field textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8eaf0;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    background: #fafbfc;
    outline: none;
    color: var(--text);
    line-height: 1.6;
}
.comment-form-styled .comment-field input::placeholder,
.comment-form-styled .comment-field textarea::placeholder {
    color: #bbb;
    font-style: italic;
}
.comment-form-styled .comment-field input:focus,
.comment-form-styled .comment-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,107,107,0.08);
    background: #fff;
}
.comment-form-styled .comment-field textarea {
    resize: vertical;
    min-height: 150px;
}
.comment-form-styled .comment-field-half {
    display: inline-block;
    width: calc(50% - 8px);
    margin-right: 16px;
    vertical-align: top;
}
.comment-form-styled .comment-field-half:last-of-type {
    margin-right: 0;
}
/* Submit */
.comment-form-styled .comment-submit-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}
.comment-form-styled .comment-submit-btn {
    background: linear-gradient(135deg, var(--primary), #ee5a24);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 18px rgba(255,107,107,0.3);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.comment-form-styled .comment-submit-btn::before {
    content: "";
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.comment-form-styled .comment-submit-btn:hover::before {
    left: 100%;
}
.comment-form-styled .comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255,107,107,0.4);
}
.comment-form-styled .comment-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255,107,107,0.3);
}
/* Cancel reply */
.comment-form-styled #cancel-comment-reply-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.comment-form-styled #cancel-comment-reply-link:hover {
    color: var(--primary-dark);
}
/* Comments section title */
.comments-area .comments-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}
/* Must login message */
.comment-form-styled .must-log-in {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fc, #eef0ff);
    border-radius: 14px;
    border: 1px solid #e4e7f0;
    font-size: 15px;
    color: #666;
    text-align: center;
}
.comment-form-styled .must-log-in a {
    color: var(--primary);
    font-weight: 700;
}
/* Mobile */
@media (max-width: 600px) {
    .comment-form-styled {
        padding: 20px 16px;
        border-radius: 16px;
    }
    .comment-form-styled .comment-field-half {
        width: 100%;
        margin-right: 0;
    }
    .comment-form-styled .comment-submit-btn {
        width: 100%;
        text-align: center;
    }
    .comment-form-wrap #reply-title {
        font-size: 18px;
    }
}

/* Like button compact in product cards */
.product-meta {
    gap: 8px;
    flex-wrap: nowrap;
}
.product-meta .like-btn {
    padding: 4px 10px;
    font-size: 12px;
    border-width: 1.5px;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}
.product-meta .like-btn .like-icon {
    width: 14px;
    height: 14px;
}

/* Password match indicator */
.pwd-match-text { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; transition: color 0.2s; }
.pwd-match-ok { color: #27ae60; }
.pwd-match-err { color: #e74c3c; }

/* Comment delete button */
.comment-delete-btn { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; transition: background 0.2s, color 0.2s; }
.comment-delete-btn:hover { background: #fdecea; color: #c0392b; }
.comment-delete-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Favorite button */
.fav-btn { background: none; border: 1.5px solid #ddd; color: #999; cursor: pointer; padding: 4px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s; flex-shrink: 0; }
.fav-btn .fav-icon { fill: none; stroke: currentColor; stroke-width: 2; transition: all 0.2s; }
.fav-btn:hover { border-color: #f39c12; color: #f39c12; }
.fav-btn.favorited { border-color: #f39c12; color: #f39c12; background: #fef9e7; }
.fav-btn.favorited .fav-icon { fill: #f39c12; stroke: #f39c12; }
.product-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; }

/* Favorite button in gallery */
.gallery-item-actions .fav-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.2); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; padding: 0; transition: all 0.2s; }
.gallery-item-actions .fav-btn:hover { background: rgba(255,255,255,0.4); transform: scale(1.1); }
.gallery-item-actions .fav-btn.favorited { background: rgba(242,169,34,0.6); border-color: rgba(242,169,34,0.8); }
.gallery-item-actions .fav-btn .fav-icon { fill: none; stroke: #fff; width: 18px; height: 18px; }
.gallery-item-actions .fav-btn.favorited .fav-icon { fill: #fff; stroke: #fff; }

/* Remove from favorites button */
.fav-remove-btn { background: none; border: 1px solid #e74c3c; color: #e74c3c; cursor: pointer; font-size: 12px; padding: 4px 10px; border-radius: 6px; margin-top: 6px; transition: all 0.2s; width: 100%; }
.fav-remove-btn:hover { background: #fdecea; }

/* === Catalog Grid (thirdparty_book archive) === */
.catalog-container { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.catalog-header { text-align: center; margin-bottom: 30px; }
.catalog-title { font-size: 28px; font-weight: 700; color: #2d2d2d; }
.catalog-desc { color: #666; margin-top: 8px; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.catalog-card { display: block; text-decoration: none; color: inherit; text-align: center; transition: transform 0.2s; }
.catalog-card:hover { transform: translateY(-4px); }
.catalog-card-image { border-radius: 8px; overflow: hidden; background: #f5f5f5; aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.catalog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.catalog-card-title { font-size: 14px; font-weight: 600; margin-top: 10px; line-height: 1.3; color: #2d2d2d; }
.catalog-placeholder { font-size: 60px; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(135deg, #f0e6ff, #e6f0ff); }
.catalog-empty { text-align: center; padding: 60px 20px; color: #999; }
@media (max-width: 768px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .catalog-card-title { font-size: 12px; } }

/* === Single Book Page === */
.book-single-container { max-width: 1000px; margin: 0 auto; padding: 30px 20px; }
.book-single-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.book-single-cover { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.book-single-cover img { width: 100%; height: auto; display: block; }
.book-single-title { font-size: 26px; font-weight: 700; color: #2d2d2d; margin-bottom: 12px; }
.book-publisher-badge { display: inline-block; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.book-rating { font-size: 20px; margin-bottom: 16px; }
.book-meta-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; padding: 16px; background: #f8f8f8; border-radius: 10px; }
.book-meta-item { display: flex; justify-content: space-between; }
.book-meta-label { color: #888; font-size: 14px; }
.book-meta-value { font-weight: 600; font-size: 14px; color: #2d2d2d; }
.book-price { color: #e74c3c; font-size: 18px; }
.book-buy-btn { display: inline-block; background: linear-gradient(135deg, #ff6b6b, #ee5a24); color: #fff; padding: 12px 30px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; margin-bottom: 20px; }
.book-buy-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(238,90,36,0.3); }
.book-description { line-height: 1.7; color: #444; }
.book-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.book-tag { display: inline-block; background: #f0e6ff; color: #764ba2; padding: 4px 12px; border-radius: 16px; font-size: 12px; text-decoration: none; }
.book-tag:hover { background: #e0d0f5; }
@media (max-width: 768px) { .book-single-layout { grid-template-columns: 1fr; gap: 24px; } }

/* Download button */
.book-action-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.book-download-btn { display: inline-block; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; padding: 12px 30px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.book-download-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102,126,234,0.3); color: #fff; }

/* Download locked state */
.book-download-locked { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 20px; background: linear-gradient(135deg, #f8f4ff, #eef0ff); border: 2px solid #e0d4f5; border-radius: 16px; text-align: center; color: #555; font-size: 14px; position: relative; overflow: hidden; }
.book-download-locked::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #667eea, #764ba2, #ee5a24); }
.book-download-locked .lock-icon { font-size: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.book-download-locked span:not(.lock-icon) { font-size: 14px; color: #666; line-height: 1.4; max-width: 280px; }
.book-register-btn { display: inline-block; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff !important; padding: 10px 28px; border-radius: 25px; font-weight: 600; text-decoration: none; font-size: 14px; box-shadow: 0 4px 12px rgba(102,126,234,0.3); transition: all 0.3s; }
.book-register-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(102,126,234,0.4); color: #fff !important; }
