/* ========== ОСНОВНЫЕ НАСТРОЙКИ ========== */
:root {
    --bg: #0a0a0c;
    --text: #e0e0e0;
    --accent: #bd93f9;
    --cynic: #ff5e7c;
    --stoic: #5e9cff;
    --absurd: #c85eff;
    --card-bg: rgba(20, 20, 25, 0.9);
    --border: rgba(189, 147, 249, 0.3);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    font-size: 18px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== ШАПКА ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

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

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.main-nav a:hover {
    color: var(--accent);
}

.main-nav a.active {
    color: var(--accent);
    font-weight: 600;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.lang-switch {
    display: flex;
    gap: 15px;
}

.lang-switch a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 30px;
    background: rgba(255,255,255,0.05);
    transition: 0.2s;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.lang-switch a:hover {
    background: rgba(255,255,255,0.1);
}

.lang-switch a.active {
    background: var(--accent);
    color: #000;
}

.lang-switch svg {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}

.lang-current {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 30px;
    font-weight: 600;
    opacity: 0.7;
    cursor: default;
}

/* ========== ГЛАВНАЯ ========== */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    margin-bottom: 40px;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px 20px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.hero-quote {
    font-size: 1.2rem;
    color: var(--accent);
    font-style: italic;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Поле ввода */
.input-portal {
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
}

.input-area {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 10px;
}

.portal-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at center, var(--accent) 0%, transparent 70%);
    opacity: 0.2;
    filter: blur(20px);
    z-index: 1;
    animation: portalPulse 4s ease-in-out infinite;
}

@keyframes portalPulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.05); }
}

textarea {
    flex: 1;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    border: 1px solid var(--accent);
    border-radius: 40px;
    padding: 18px 25px;
    color: white;
    font-size: 1.1rem;
    font-family: inherit;
    resize: none;
    outline: none;
    box-shadow: 0 0 20px rgba(189,147,249,0.3);
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(189,147,249,0.5);
}

#send-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

#send-btn:hover {
    transform: scale(1.1);
    background: #a074e0;
}

#send-btn svg {
    width: 28px;
    fill: #000;
}

.char-counter {
    position: absolute;
    bottom: 10px;
    right: 80px;
    color: #888;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.5);
    padding: 2px 10px;
    border-radius: 20px;
}

#form_time {
    display: none;
}

/* Сетка ответов */
#mirror-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 50px 0;
    display: none;
}

#mirror-grid.visible {
    display: grid;
}

.mirror-card {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), var(--bg-img);
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--border);
    transition: 0.3s;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.mirror-card.cynic { --bg-img: url('../img/cynic-spirit.jpg'); }
.mirror-card.stoic { --bg-img: url('../img/stoic-statue.jpg'); }
.mirror-card.absurd { --bg-img: url('../img/absurd-melting.jpg'); }

.mirror-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.mirror-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.content {
    flex: 1;
    font-size: 1.1rem;
    color: #eee;
}

.card-footer {
    margin-top: 20px;
    color: #aaa;
    font-style: italic;
    text-align: right;
}

.hint {
    text-align: center;
    font-size: 1.2rem;
    color: var(--accent);
    margin: 30px 0;
}

/* SEO секция */
.seo {
    background: rgba(0,0,0,0.3);
    border-radius: 30px;
    padding: 40px;
    margin: 60px 0;
    text-align: center;
}

.seo h2 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.seo p {
    max-width: 800px;
    margin: 0 auto 20px;
    color: #ccc;
}

.seo ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.seo li {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Точки цветов */
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.cynic-dot { background: var(--cynic); box-shadow: 0 0 10px var(--cynic); }
.stoic-dot { background: var(--stoic); box-shadow: 0 0 10px var(--stoic); }
.absurd-dot { background: var(--absurd); box-shadow: 0 0 10px var(--absurd); }

/* Мистическая сетка */
.mystic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 60px 0;
    border-radius: 30px;
    overflow: hidden;
}

.mystic-overlay {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 60px 40px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(3px);
}

.mystic-item {
    background: rgba(255,255,255,0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
}

.mystic-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 20px;
    color: var(--accent);
}

/* ========== СТРАНИЦА ОТРАЖЕНИЯ ========== */
.reflection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-link:hover {
    transform: translateX(-5px);
}

.reflection-meta {
    display: flex;
    gap: 20px;
    color: #888;
    font-size: 0.95rem;
    align-items: center;
}

.reflection-meta time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

h1.reflection-question {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px 60px;
    background: linear-gradient(135deg, rgba(189,147,249,0.1), rgba(0,0,0,0.3));
    border-radius: 60px;
    position: relative;
    text-align: center;
    border: 1px solid var(--border);
    font-size: 2rem;
    line-height: 1.4;
    color: #fff;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

h1.reflection-question.long-question {
    font-size: 1.5rem;
    padding: 30px 40px;
    text-align: left;
}

.quote-mark {
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.3;
    font-family: serif;
    line-height: 0.8;
    position: absolute;
}

.quote-mark:first-child {
    top: 10px;
    left: 20px;
}

.quote-mark.close {
    bottom: 0;
    right: 20px;
    transform: rotate(180deg);
}

.reflection-answers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 60px 0;
}

.answer-card {
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    padding: 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
}

.answer-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.answer-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.answer-card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.answer-card p {
    flex: 1;
    color: #eee;
    line-height: 1.7;
    font-size: 1.1rem;
    overflow-y: auto;
    max-height: 300px;
    padding-right: 10px;
    margin: 0 0 20px 0;
}

.answer-card p::-webkit-scrollbar {
    width: 5px;
}

.answer-card p::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.answer-card p::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.answer-footer {
    margin-top: auto;
    color: #aaa;
    font-style: italic;
    text-align: right;
    border-top: 1px dashed rgba(255,255,255,0.1);
    padding-top: 15px;
    font-size: 0.9rem;
}

.reflection-share {
    text-align: center;
    margin: 40px 0;
}

.share-btn {
    background: rgba(189,147,249,0.1);
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 15px 40px;
    border-radius: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}

.share-btn:hover {
    background: rgba(189,147,249,0.2);
    transform: scale(1.05);
}

.related-reflections {
    margin: 80px 0 40px;
}

.related-reflections h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.related-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
    text-decoration: none;
    color: var(--text);
    transition: 0.3s;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.related-card:hover .related-question {
    color: var(--accent);
}

.related-question {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border);
    transition: color 0.3s;
}

.related-excerpt {
    font-size: 0.95rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== ГАЛЕРЕЯ ========== */
.gallery-header {
    text-align: center;
    padding: 40px 0;
}

.gallery-grid {
    display: grid;
    gap: 25px;
    margin: 40px 0;
}

.gallery-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
}

.gallery-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.gallery-question {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
}

.gallery-preview {
    margin-bottom: 15px;
}

.preview-item {
    color: #ccc;
    font-size: 0.95rem;
}

.gallery-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.gallery-link:hover {
    transform: translateX(5px);
}

.gallery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.gallery-lang {
    font-size: 1.1rem;
    opacity: 0.8;
}

.gallery-preview {
    margin: 15px 0;
    padding: 12px;
    background: rgba(189,147,249,0.05);
    border-radius: 12px;
    font-style: italic;
    color: #ddd;
    border-left: 3px solid var(--accent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
    text-align: center;
}

.stat-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border);
}

.stat-item div:first-child {
    font-size: 2rem;
    color: var(--accent);
}

.stat-item div:last-child {
    color: #aaa;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a {
    padding: 8px 15px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--accent);
}

.pagination .active {
    background: var(--accent);
    color: #000;
}

/* ========== КОНТАКТЫ ========== */
.contact-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 30px;
    border: 1px solid var(--border);
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h1 {
    color: var(--accent);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ddd;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.success-message {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    color: #2ecc71;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
}

.error-global {
    background: rgba(255, 94, 124, 0.1);
    border: 1px solid #ff5e7c;
    color: #ff5e7c;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--cynic), var(--accent));
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* ========== КАПЧА ========== */
.captcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.captcha-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border);
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.captcha-content h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

.captcha-image {
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    max-width: 120px;
    height: auto;
}

.captcha-refresh {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(189,147,249,0.1);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    transform: rotate(180deg);
    background: rgba(189,147,249,0.2);
}

.captcha-input {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    margin: 10px 0;
}

.captcha-input:focus {
    border-color: var(--accent);
    outline: none;
}

.captcha-error {
    color: #ff5e7c;
    font-size: 0.9rem;
    margin: 5px 0;
    min-height: 20px;
}

.captcha-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--cynic), var(--accent));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin: 10px 0;
}

.captcha-submit:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.captcha-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.captcha-close:hover {
    color: #fff;
}

/* ========== МЫСЛЬ ДНЯ ========== */
.daily-thought-container {
    max-width: 800px;
    margin: 80px auto;
    padding: 30px;
    background: rgba(189, 147, 249, 0.1);
    border-radius: 30px;
    border: 1px solid var(--border);
}

.daily-thought h4 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
}

.thought-question {
    font-size: 1.3rem;
    color: #fff;
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    font-style: italic;
}

.thought-answers {
    display: grid;
    gap: 15px;
}

.thought-cynic {
    color: var(--cynic);
    border-left: 3px solid var(--cynic);
    padding-left: 15px;
}

.thought-stoic {
    color: var(--stoic);
    border-left: 3px solid var(--stoic);
    padding-left: 15px;
}

.thought-absurd {
    color: var(--absurd);
    border-left: 3px solid var(--absurd);
    padding-left: 15px;
}

/* ========== СТРАНИЦА ОШИБКИ ========== */
.error-container {
    text-align: center;
    padding: 100px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-code {
    font-size: 120px;
    font-weight: 800;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1;
}

.error-message {
    font-size: 32px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 15px;
}

.error-description {
    font-size: 18px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 40px;
    max-width: 500px;
}

.home-link {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s;
}

.home-link:hover {
    transform: scale(1.05);
}

/* ========== ПРОГРЕСС-БАР ========== */
.loading-progress {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8e44ad, #3498db);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.loading-progress p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.loading-progress .dots {
    animation: pulse 1.5s infinite;
}

/* ========== ВСПОМОГАТЕЛЬНОЕ ========== */
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.cynic-dot {
    background: var(--cynic);
    box-shadow: 0 0 10px var(--cynic);
}

.stoic-dot {
    background: var(--stoic);
    box-shadow: 0 0 10px var(--stoic);
}

.absurd-dot {
    background: var(--absurd);
    box-shadow: 0 0 10px var(--absurd);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.temporary-error {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    z-index: 1001;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.error-message {
    color: #ff5e7c;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ========== ФУТЕР ========== */
footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-sep {
    color: #555;
}

.footer-copyright {
    color: #888;
    font-size: 0.9rem;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-copyright a {
    color: #888;
    text-decoration: none;
}

.footer-copyright a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1000px) {
    .reflection-answers,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .error-code { font-size: 80px; }
    .error-message { font-size: 24px; }
    .error-description { font-size: 16px; }
}

@media (max-width: 700px) {

    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body {
        font-size: 16px;
    }

    /* Исправление шапки */
    header {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .logo {
        grid-column: 1 !important;
        text-align: left !important;
        font-size: 1.5rem !important;
    }

    .menu-toggle {
        grid-column: 2 !important;
        justify-self: center !important;
    }

    .lang-switch {
        grid-column: 3 !important;
        justify-self: end !important;
        gap: 5px !important;
    }

    .lang-switch a {
        padding: 5px 8px !important;
        font-size: 0.9rem !important;
    }

    /* Поднимаем меню */
    .main-nav {
        padding-top: 80px !important;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        min-height: auto !important;
        padding: 20px 15px !important;
        margin-bottom: 20px !important;
    }

    .hero-content {
        padding: 10px !important;
    }

    .hero h1 {
        font-size: 2rem !important;
        margin-bottom: 5px !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }

    .hero-quote {
        font-size: 0.9rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin: 20px 0 !important;
    }

    .stat-item {
        padding: 15px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
    }

    .stat-item div:first-child {
        font-size: 1.5rem !important;
        min-width: 60px !important;
    }

    .stat-item div:last-child {
        font-size: 0.9rem !important;
    }

    .seo {
	 padding: 30px 15px !important;
	 margin: 30px 0 !important;
	 text-align: left !important;
    }

    .seo h2 {
	 font-size: 1.5rem !important;
	 text-align: left !important;
	 margin-left: 0 !important;
    }

    .seo ul {
	 justify-content: flex-start !important;
    }

    .hint {
    	font-size: 0.9rem !important;
    }

    .gallery-card {
        padding: 15px !important;
    }

    .gallery-meta {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        font-size: 0.8rem !important;
    }

    .gallery-question {
        font-size: 1rem !important;
        padding: 10px !important;
    }

    .pagination {
        flex-wrap: wrap !important;
        gap: 5px !important;
    }

    .pagination a {
        padding: 6px 10px !important;
        font-size: 0.9rem !important;
    }

    .reflection-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .reflection-answers,
    .related-grid {
        grid-template-columns: 1fr;
    }

    h1.reflection-question {
        font-size: 1.4rem;
        padding: 30px 25px;
        margin: 30px auto;
    }

    h1.reflection-question.long-question {
        font-size: 1.2rem;
        padding: 25px 20px;
    }

    .quote-mark {
        font-size: 2.5rem;
    }

    .quote-mark:first-child {
        top: 5px;
        left: 10px;
    }

    .quote-mark.close {
        bottom: 0;
        right: 10px;
    }

    .answer-card {
        min-height: 300px;
        padding: 25px;
    }

    .answer-card h2 {
        font-size: 1.5rem;
    }

    .contact-container {
        padding: 25px;
        margin: 20px;
    }

    .contact-header h1 {
        font-size: 2rem;
    }

    .daily-thought-container {
        margin: 40px auto;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        gap: 15px;
    }

    .footer-copyright {
        flex-direction: column;
        gap: 5px;
    }

    .footer-sep {
        display: none;
    }

    textarea {
    	padding: 15px 20px !important;
	font-size: 1rem !important;
	line-height: 1.4 !important;
    }

    .input-area {
    	align-items: flex-start !important;
    }

    #send-btn {
    	width: 50px !important;
	height: 50px !important;
	flex-shrink: 0 !important;
    }

    .char-counter {
    	bottom: 5px !important;
	right: 70px !important;
	font-size: 0.8rem !important;
	padding: 2px 8px !important;
    }

}

@media (max-width: 900px) and (orientation: landscape) {
    header {
        grid-template-columns: auto 1fr auto !important;
        gap: 20px !important;
    }

    .main-nav {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        border-left: none !important;
        gap: 20px !important;
    }

    .main-nav a {
        margin: 0 !important;
        font-size: 1rem !important;
    }

    .menu-toggle {
        display: none !important;
    }

    .menu-overlay {
        display: none !important;
    }
}

@media (max-width: 480px) {
    h1.reflection-question {
        font-size: 1.2rem;
        padding: 25px 20px;
    }

    .reflection-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
/* ========== МОБИЛЬНОЕ МЕНЮ ========== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 700px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--card-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 80px 20px 30px;
        margin: 0;
        transition: right 0.3s ease;
        z-index: 100;
        border-left: 1px solid var(--border);
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav a {
        margin: 10px 0;
        font-size: 1.2rem;
    }

    body.menu-open {
        overflow: hidden;
    }
}
/* ========== СОЦИАЛЬНЫЕ СЕТИ В ФУТЕРЕ ========== */
.footer-social {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.social-link {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.social-link:hover {
    color: #fff;
}

.social-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(189,147,249,0.3));
}

@media (max-width: 700px) {
    .footer-content {
        gap: 15px;
    }

    .footer-social {
        flex-wrap: wrap;
        gap: 10px;
    }
}
