:root {
    --black: #000000;
    --white: #ffffff;
    --gray: #333333;
    --gray-light: #1a1a1a;
    --gray-mid: #2a2a2a;
    --duck-yellow: #FFD700;
    --duck-yellow-dim: rgba(255, 215, 0, 0.15);
    --duck-yellow-glow: rgba(255, 215, 0, 0.3);
    --bubble-bg: #7a2a2a;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-yellow: rgba(255, 215, 0, 0.3);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: cursive;
    font-weight: 600;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

a {
    color: var(--duck-yellow);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #FFC800;
}

/* ============================
   ШАПКА
   ============================ */
.duck-header {
    padding: 20px 30px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: inline-block;
    cursor: pointer;
    position: relative;
}

.duck-logo {
    width: 80px;
    height: auto;
    transition: transform 0.2s;
}

.duck-logo:hover {
    transform: scale(1.1);
}

/* ============================
   МЕНЮ
   ============================ */
.duck-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duck-nav a {
    color: var(--white);
    font-family: cursive;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid transparent;
    transition: all 0.25s;
    letter-spacing: 0.02em;
}

.duck-nav a:hover,
.duck-nav a.current-menu-item {
    color: var(--duck-yellow);
    border-color: var(--border-yellow);
    background: var(--duck-yellow-dim);
}

/* ============================
   ОСНОВНОЙ КОНТЕНТ
   ============================ */
.duck-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 90;
}

.main-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 48px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--white);
    text-shadow: 0 0 10px var(--duck-yellow-glow);
}

/* ============================
   ЦЕНТРАЛЬНАЯ УТКА
   ============================ */
.center-duck-container {
    cursor: pointer;
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.duck-center {
    width: auto;
    height: auto;
    transition: transform 0.2s;
    filter: drop-shadow(0 0 15px var(--duck-yellow-glow));
    opacity: 0.98;
}

.duck-center:hover {
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.4));
}

/* ============================
   CF7 ФОРМА
   ============================ */
.cf7-form-container {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.04);
    padding: 32px;
    border-radius: 16px;
    margin-top: 20px;
    border: 1px solid var(--border-subtle);
}

.wpcf7-form label {
    font-family: cursive;
    font-weight: 600;
    color: var(--white);
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--white);
    font-family: cursive;
    font-weight: 600;
    font-size: 15px;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.wpcf7-form input[type="text"]::placeholder,
.wpcf7-form input[type="email"]::placeholder,
.wpcf7-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    border-color: var(--duck-yellow);
    background: rgba(255, 215, 0, 0.07);
}

.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

.wpcf7-form input[type="submit"] {
    width: 100%;
    background: var(--duck-yellow);
    color: var(--black);
    font-family: cursive;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 17px;
    letter-spacing: 0.03em;
    transition: all 0.25s;
    margin-bottom: 0;
}

.wpcf7-form input[type="submit"]:hover {
    background: #FFC800;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--duck-yellow-glow);
}

.wpcf7-not-valid-tip {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: -14px;
    margin-bottom: 10px;
    display: block;
}

.wpcf7-response-output {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--border-yellow);
    background: var(--duck-yellow-dim);
    color: var(--duck-yellow);
}

.wpcf7-mail-sent-ok {
    border-color: rgba(0, 200, 100, 0.4);
    background: rgba(0, 200, 100, 0.08);
    color: #00c864;
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
    border-color: rgba(255, 80, 80, 0.4);
    background: rgba(255, 80, 80, 0.08);
    color: #ff5050;
}

/* ============================
   БЕГУЩИЕ УТКИ
   ============================ */
.ducks-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ============================
   ОБЛАЧКО
   ============================ */
.speech-bubble {
    position: absolute;
    background-color: var(--bubble-bg);
    color: var(--duck-yellow);
    padding: 12px 24px;
    border-radius: 40px;
    font-family: cursive;
    font-weight: 600;
    font-size: 18px;
    white-space: nowrap;
    box-shadow: 0 4px 15px var(--duck-yellow-glow);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 200;
    border: 2px solid var(--border-yellow);
}

.speech-bubble.show {
    opacity: 1;
}

.logo-container .speech-bubble {
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 20px;
}

.logo-container .speech-bubble::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.center-duck-container .speech-bubble {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 20px;
    margin-bottom: 20px;
    white-space: nowrap;
}

.center-duck-container .speech-bubble::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent white transparent;
}

/* ============================
   БЛОГ НА ГЛАВНОЙ
   ============================ */
.home-blog-section {
    position: relative;
    z-index: 90;
    padding: 80px 20px;
    border-top: 1px solid var(--border-subtle);
    width: 100%;
}

.home-blog-inner {
    max-width: 900px;
    margin: 0 auto;
}

.home-blog-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 32px;
    text-align: center;
    margin: 0 0 48px;
    color: var(--white);
    text-shadow: 0 0 10px var(--duck-yellow-glow);
}

.home-blog-all {
    display: inline-block;
    font-family: cursive;
    font-weight: 600;
    font-size: 15px;
    color: var(--duck-yellow);
    border: 1px solid var(--border-yellow);
    border-radius: 24px;
    padding: 10px 28px;
    transition: all 0.25s;
}

.home-blog-all:hover {
    background: var(--duck-yellow-dim);
    color: var(--duck-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--duck-yellow-glow);
}

/* ============================
   СТРАНИЦА СО СПИСКОМ СТАТЕЙ
   ============================ */
.duck-page {
    flex: 1;
    padding: 120px 20px 80px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 90;
}

.duck-page-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 42px;
    text-align: center;
    margin-bottom: 60px;
    color: var(--white);
    text-shadow: 0 0 10px var(--duck-yellow-glow);
}

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

.post-card {
    background: var(--gray-light);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-yellow);
    box-shadow: 0 8px 32px var(--duck-yellow-glow);
}

.post-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.post-card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--gray-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    font-family: cursive;
    font-weight: 600;
}

.post-card-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 18px;
    color: var(--white);
    margin: 0 0 12px;
    line-height: 1.4;
}

.post-card-excerpt {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    flex: 1;
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-card-link {
    display: inline-block;
    color: var(--duck-yellow);
    font-family: cursive;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border-yellow);
    border-radius: 20px;
    padding: 6px 16px;
    transition: all 0.2s;
    align-self: flex-start;
}

.post-card-link:hover {
    background: var(--duck-yellow-dim);
    color: var(--duck-yellow);
}

.posts-pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.posts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    color: var(--white);
    font-family: cursive;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.posts-pagination .page-numbers:hover,
.posts-pagination .page-numbers.current {
    border-color: var(--duck-yellow);
    background: var(--duck-yellow-dim);
    color: var(--duck-yellow);
}

/* ============================
   ОДИНОЧНАЯ СТАТЬЯ
   ============================ */
.duck-article {
    flex: 1;
    padding: 120px 20px 80px;
    max-width: 780px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 90;
}

.article-header {
    margin-bottom: 48px;
}

.article-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-family: cursive;
    font-weight: 600;
    margin-bottom: 16px;
}

.article-meta a {
    color: var(--duck-yellow);
}

.article-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 40px;
    line-height: 1.25;
    margin: 0 0 24px;
    text-shadow: 0 0 10px var(--duck-yellow-glow);
}

.article-thumb {
    width: 100%;
    border-radius: 12px;
    display: block;
    margin-top: 24px;
}

.article-content {
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: cursive;
    font-weight: 600;
    color: var(--white);
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.article-content h2 { font-size: 28px; }
.article-content h3 { font-size: 22px; }
.article-content h4 { font-size: 18px; }

.article-content p {
    margin-bottom: 1.5em;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.article-content li {
    margin-bottom: 0.4em;
}

.article-content blockquote {
    border-left: 3px solid var(--duck-yellow);
    margin: 2em 0;
    padding: 12px 24px;
    background: var(--duck-yellow-dim);
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    border-radius: 8px;
}

.article-content a {
    color: var(--duck-yellow);
    border-bottom: 1px dotted var(--border-yellow);
}

.article-content a:hover {
    border-bottom-style: solid;
}

/* ============================
   КОД В СТАТЬЯХ И ПРИЛОЖЕНИЯХ
   ============================ */
.article-content pre,
.app-content pre,
pre.duck-code {
    background: #0d0d0d;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 1.5em 0;
    position: relative;
}

.article-content pre code,
.app-content pre code,
pre.duck-code code {
    font-family: 'Courier New', Courier, monospace;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.65;
    color: #e2e8f0;
    background: none;
    padding: 0;
    border: none;
}

.article-content code,
.app-content code {
    font-family: 'Courier New', Courier, monospace;
    font-weight: normal;
    font-size: 0.875em;
    background: rgba(255, 215, 0, 0.1);
    color: var(--duck-yellow);
    padding: 2px 7px;
    border-radius: 4px;
}

.duck-code-block {
    position: relative;
    margin: 1.5em 0;
}

.duck-code-lang {
    display: inline-block;
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 11px;
    font-family: cursive;
    font-weight: 600;
    color: rgba(255, 215, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.duck-code-copy {
    display: inline-block;
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 12px;
    font-family: cursive;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
}

.duck-code-copy:hover {
    color: var(--duck-yellow);
    border-color: var(--border-yellow);
    background: var(--duck-yellow-dim);
}

/* ============================
   СВЯЗАННЫЕ СТАТЬИ (под статьёй)
   ============================ */
.related-posts {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border-subtle);
}

.related-posts-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 28px;
    color: var(--white);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ============================
   СТРАНИЦА ПРИЛОЖЕНИЙ
   ============================ */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.app-card {
    background: var(--gray-light);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 28px;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-yellow);
    box-shadow: 0 8px 32px var(--duck-yellow-glow);
}

.app-card-icon {
    font-size: 40px;
    line-height: 1;
}

.app-card-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 20px;
    color: var(--white);
    margin: 0;
}

.app-card-type {
    display: inline-block;
    font-size: 11px;
    font-family: cursive;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--duck-yellow);
    background: var(--duck-yellow-dim);
    border: 1px solid var(--border-yellow);
    border-radius: 20px;
    padding: 3px 10px;
    align-self: flex-start;
}

.app-card-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
    flex: 1;
}

.app-card-link {
    display: inline-block;
    color: var(--duck-yellow);
    font-family: cursive;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border-yellow);
    border-radius: 20px;
    padding: 7px 18px;
    transition: all 0.2s;
    align-self: flex-start;
    margin-top: 4px;
}

.app-card-link:hover {
    background: var(--duck-yellow-dim);
    color: var(--duck-yellow);
}

/* ============================
   СТРАНИЦА ОДНОГО ПРИЛОЖЕНИЯ
   ============================ */
.duck-app-page {
    flex: 1;
    padding: 120px 20px 80px;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 90;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.app-header-icon {
    font-size: 64px;
    line-height: 1;
    flex-shrink: 0;
}

.app-header-info {
    flex: 1;
}

.app-header-type {
    display: inline-block;
    font-size: 12px;
    font-family: cursive;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--duck-yellow);
    background: var(--duck-yellow-dim);
    border: 1px solid var(--border-yellow);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 10px;
}

.app-header-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 38px;
    margin: 0 0 12px;
    text-shadow: 0 0 10px var(--duck-yellow-glow);
}

.app-header-desc {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.app-thumb {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 48px;
    display: block;
}

.app-content {
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
}

.app-content h2,
.app-content h3,
.app-content h4 {
    font-family: cursive;
    font-weight: 600;
    color: var(--white);
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.app-content h2 { font-size: 28px; }
.app-content h3 { font-size: 22px; }

.app-content p { margin-bottom: 1.5em; }

.app-content ul,
.app-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.app-content li { margin-bottom: 0.4em; }

.app-content blockquote {
    border-left: 3px solid var(--duck-yellow);
    margin: 2em 0;
    padding: 12px 24px;
    background: var(--duck-yellow-dim);
    border-radius: 0 8px 8px 0;
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
}

.app-content a {
    color: var(--duck-yellow);
    border-bottom: 1px dotted var(--border-yellow);
}

.app-content a:hover {
    border-bottom-style: solid;
}

.app-content code {
    font-family: 'Courier New', Courier, monospace;
    font-weight: normal;
    font-size: 0.875em;
    background: rgba(255, 215, 0, 0.1);
    color: var(--duck-yellow);
    padding: 2px 7px;
    border-radius: 4px;
}

/* Секции на странице приложения */
.app-section {
    margin-bottom: 56px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--border-subtle);
}

.app-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.app-section-title {
    font-family: cursive;
    font-weight: 600;
    font-size: 26px;
    color: var(--duck-yellow);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.app-features-list li {
    background: var(--gray-light);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-features-list li::before {
    content: '🦆';
    font-size: 16px;
    flex-shrink: 0;
}

.app-install-steps {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
    margin: 0;
}

.app-install-steps li {
    counter-increment: step-counter;
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.app-install-steps li::before {
    content: counter(step-counter);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--duck-yellow);
    color: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: cursive;
    font-weight: 600;
    font-size: 14px;
    margin-top: 2px;
}

/* ============================
   АДАПТИВНОСТЬ
   ============================ */
@media (max-width: 768px) {
    .duck-header {
        padding: 16px 20px;
    }

    .duck-logo {
        width: 60px;
    }

    .duck-nav a {
        font-size: 13px;
        padding: 6px 12px;
    }

    .main-title {
        font-size: 32px;
    }

    .duck-center {
        width: 150px;
    }

    .speech-bubble {
        font-size: 16px;
        padding: 10px 20px;
        white-space: normal;
        max-width: 250px;
        text-align: center;
    }

    .center-duck-container .speech-bubble {
        white-space: normal;
        max-width: 280px;
    }

    .duck-page-title,
    .article-title,
    .app-header-title {
        font-size: 28px;
    }

    .posts-grid,
    .apps-grid {
        grid-template-columns: 1fr;
    }

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

    .duck-page,
    .duck-article,
    .duck-app-page {
        padding-top: 100px;
    }
}


