/*
Theme Name: Звёздный дневник Марианны
Theme URI: https://marianna-star-diary.ru
Author: Claude AI
Author URI: https://claude.ai
Description: Персональный вдохновляющий сайт-помощник в стиле Genshin Impact. Советы на каждый день, задачи месяца, разбор личности, наука, психология, упражнения, книги, рецепты и многое другое. Полностью редактируемая тема через Настройки > Настроить.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marianna-star-diary
Tags: dark, one-column, custom-menu, custom-logo, featured-images, theme-options
*/

/* ============================================
   CUSTOM PROPERTIES
   ============================================ */
:root {
  --gold: #e3b96b;
  --gold-bright: #f5d491;
  --ink: #0c1226;
  --ink-2: #131b38;
  --font-display: 'Cormorant', serif;
  --font-body: 'Manrope', sans-serif;
}

/* ============================================
   BASE RESET & BODY
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background-color: var(--ink);
  color: #e9ecf8;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(62,84,172,0.25), transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(227,185,107,0.10), transparent 45%),
    radial-gradient(ellipse at 60% 100%, rgba(56,152,168,0.14), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* WordPress admin bar fix */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* ============================================
   STARS TWINKLING OVERLAY
   ============================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 34% 64%, rgba(245,212,145,0.7), transparent),
    radial-gradient(1px 1px at 90% 48%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 56% 32%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1px 1px at 8% 80%, rgba(245,212,145,0.6), transparent),
    radial-gradient(1px 1px at 66% 86%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 44% 8%, rgba(255,255,255,0.7), transparent);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

/* ============================================
   GLASS CARD
   ============================================ */
.glass {
  background: linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid rgba(227,185,107,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(4,8,24,0.45);
}
.glass-hover {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.glass-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(245,212,145,0.55);
  box-shadow: 0 12px 40px rgba(227,185,107,0.12);
}

/* ============================================
   GOLD TEXT GRADIENT
   ============================================ */
.gold-text {
  background: linear-gradient(120deg, #f5d491, #e3b96b 45%, #fff2d0 70%, #e3b96b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.gold-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227,185,107,0.7), transparent);
  flex: 1;
}
.diamond {
  display: inline-block;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #f5d491, #b9893b);
  box-shadow: 0 0 8px rgba(245,212,145,0.8);
  flex-shrink: 0;
}

/* ============================================
   FONT DISPLAY HELPER
   ============================================ */
.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ============================================
   FLOATING ANIMATION
   ============================================ */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.floaty { animation: floaty 6s ease-in-out infinite; }

/* ============================================
   SELECTION & SCROLLBAR
   ============================================ */
::selection { background: rgba(227,185,107,0.35); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: rgba(227,185,107,0.35); border-radius: 8px; }

/* ============================================
   PAGE HEADER BANNER
   ============================================ */
.page-hero {
  position: relative;
  overflow: hidden;
}
.page-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12,18,38,.6), rgba(12,18,38,.4), #0c1226);
}
.page-hero__content {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1rem 3.5rem;
  text-align: center;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  height: 0.75rem;
  overflow: hidden;
  border-radius: 9999px;
  background: rgba(255,255,255,0.1);
}
.progress-bar__fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(to right, #2dd4bf, #fbbf24, #f59e0b);
  transition: width 0.5s ease;
}

/* ============================================
   CHECKBOX STYLE
   ============================================ */
.task-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(227,185,107,0.4);
  color: transparent;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  background: transparent;
}
.task-check.checked {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0c1226;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn-gold {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  color: #0c1226;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(245,158,11,0.2);
  transition: filter 0.2s;
}
.btn-gold:hover { filter: brightness(1.1); color: #0c1226; }

.btn-outline {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(227,185,107,0.4);
  color: #fef3c7;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-outline:hover { background: rgba(227,185,107,0.1); }

/* ============================================
   TAG / BADGE
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  border: 1px solid;
}
.badge-teal { border-color: rgba(94,234,212,0.3); color: #5eead4; }
.badge-amber { border-color: rgba(227,185,107,0.3); color: #fde68a; }
.badge-fuchsia { border-color: rgba(232,121,249,0.3); color: #e879f9; }

/* ============================================
   TRAIT PILL
   ============================================ */
.trait {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(227,185,107,0.3);
  background: rgba(227,185,107,0.1);
  font-size: 0.875rem;
  color: #fef3c7;
}

/* ============================================
   TABS (Daily page)
   ============================================ */
.tab-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(227,185,107,0.3);
  background: transparent;
  color: #fef3c7;
}
.tab-btn:hover { background: rgba(227,185,107,0.1); }
.tab-btn.active {
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  color: #0c1226;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(245,158,11,0.2);
}

/* ============================================
   DEEDS INPUT
   ============================================ */
.deed-input {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.05);
  border: none;
  color: #f1f5f9;
  font-size: 1rem;
  font-family: var(--font-body);
}
.deed-input::placeholder { color: #64748b; }
.deed-input:focus { outline: none; box-shadow: 0 0 0 1px rgba(227,185,107,0.5); }

.deed-add-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(to right, #fbbf24, #f59e0b);
  color: #0c1226;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
}
.deed-add-btn:hover { filter: brightness(1.1); }

/* ============================================
   NUMBERED STEP
   ============================================ */
.step-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.05);
}
.step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
.container { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.container-sm { max-width: 48rem; margin: 0 auto; padding: 0 1rem; }
.container-md { max-width: 56rem; margin: 0 auto; padding: 0 1rem; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ============================================
   NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(227,185,107,0.15);
  background: rgba(12,18,38,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav-brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.nav-links {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none !important; }
}
.nav-links a {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #cbd5e1;
  transition: all 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.05); color: #fef3c7; }
.nav-links a.active { background: rgba(227,185,107,0.15); color: #fde68a; }

.nav-toggle {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(227,185,107,0.3);
  background: transparent;
  color: #fde68a;
  cursor: pointer;
  font-size: 1rem;
}
.nav-mobile {
  display: none;
  border-top: 1px solid rgba(227,185,107,0.1);
  background: rgba(12,18,38,0.95);
  padding: 0.75rem 1rem;
}
.nav-mobile.open { display: block; }
.nav-mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-mobile-grid a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}
.nav-mobile-grid a:hover { background: rgba(255,255,255,0.05); }
.nav-mobile-grid a.active { background: rgba(227,185,107,0.15); color: #fde68a; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero { position: relative; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.5;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(12,18,38,.5), rgba(12,18,38,.3), #0c1226);
}
.hero__inner {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 3.5rem 1rem 4rem;
  display: grid;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) {
  .hero__inner { grid-template-columns: 1.2fr 0.8fr; }
}
.hero__companion {
  display: none;
  justify-content: center;
}
@media (min-width: 768px) {
  .hero__companion { display: flex; }
}
.hero__companion img {
  max-height: 420px;
  object-fit: contain;
  border-radius: 1rem;
  filter: drop-shadow(0 0 35px rgba(227,185,107,0.25));
}

/* ============================================
   SECTIONS GRID
   ============================================ */
.sections-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) { .sections-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .sections-grid { grid-template-columns: 1fr 1fr 1fr; } }

.articles-grid, .books-grid, .recipes-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .articles-grid, .books-grid, .recipes-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   PETS SECTION
   ============================================ */
.pets-section {
  display: grid;
  align-items: center;
  overflow: hidden;
}
@media (min-width: 768px) {
  .pets-section { grid-template-columns: 1fr 1fr; }
}
.pets-section img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ============================================
   TODAY CARD
   ============================================ */
.today-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .today-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   DEEDS LAYOUT
   ============================================ */
.deeds-layout {
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .deeds-layout { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  position: relative;
  z-index: 10;
  margin-top: 5rem;
  border-top: 1px solid rgba(227,185,107,0.1);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* ============================================
   WP SPECIFIC OVERRIDES
   ============================================ */
.wp-block-image img { border-radius: 1rem; }
.entry-content p { margin-bottom: 1rem; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
