:root {
  --md-primary: #6750A4;
  --md-on-primary: #FFFFFF;
  --md-primary-container: #EADDFF;
  --md-on-primary-container: #21005D;

  --md-secondary: #625B71;
  --md-on-secondary: #FFFFFF;
  --md-secondary-container: #E8DEF8;
  --md-on-secondary-container: #1D192B;

  --md-tertiary: #E94560;
  --md-on-tertiary: #FFFFFF;
  --md-tertiary-container: #FFD9E4;
  --md-on-tertiary-container: #3B001E;

  --md-surface: #FEF7FF;
  --md-surface-dim: #DED8E1;
  --md-surface-bright: #FEF7FF;
  --md-surface-container-lowest: #FFFFFF;
  --md-surface-container-low: #F7F2FA;
  --md-surface-container: #F3EDF7;
  --md-surface-container-high: #ECE6F0;
  --md-surface-container-highest: #E6E0E9;
  --md-on-surface: #1D1B20;
  --md-on-surface-variant: #49454F;
  --md-outline: #79747E;
  --md-outline-variant: #CAC4D0;

  --md-error: #B3261E;
  --md-on-error: #FFFFFF;

  --md-elevation-1: 0 1px 2px rgba(0,0,0,.30), 0 1px 3px 1px rgba(0,0,0,.15);
  --md-elevation-2: 0 1px 2px rgba(0,0,0,.30), 0 2px 6px 2px rgba(0,0,0,.15);
  --md-elevation-3: 0 4px 8px 3px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.30);
  --md-elevation-4: 0 6px 10px 4px rgba(0,0,0,.15), 0 2px 3px rgba(0,0,0,.30);

  --md-shape-xs: 4px;
  --md-shape-sm: 8px;
  --md-shape-md: 12px;
  --md-shape-lg: 16px;
  --md-shape-xl: 28px;
  --md-shape-full: 999px;

  --md-motion-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-motion-emphasized: cubic-bezier(0.2, 0, 0, 1);
  --md-duration-short: 200ms;
  --md-duration-medium: 350ms;
  --md-duration-long: 600ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Roboto", "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--md-on-surface);
  background: var(--md-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.md-wrapper {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 600px) {
  .md-wrapper { padding: 0 16px; }
}

/* ===== Typography ===== */
h1, h2, h3, h4 { font-family: "Google Sans", "Roboto", sans-serif; font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 5vw, 57px); line-height: 1.12; font-weight: 400; }
h2 { font-size: clamp(24px, 3.5vw, 45px); line-height: 1.15; font-weight: 400; }
h3 { font-size: clamp(18px, 2vw, 24px); line-height: 1.3; }
h4 { font-size: 18px; line-height: 1.4; }

.md-overline {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--md-primary);
  margin-bottom: 12px;
}
.md-overline--light { color: var(--md-on-primary); opacity: 0.9; }

/* ===== Top App Bar ===== */
.md-top-app-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: var(--md-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  transition: background var(--md-duration-short) var(--md-motion-standard),
              box-shadow var(--md-duration-short) var(--md-motion-standard);
}
.md-top-app-bar.scrolled {
  background: var(--md-surface-container);
  box-shadow: var(--md-elevation-2);
}

.md-top-app-bar__leading {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--md-on-surface);
  font-weight: 500;
}
.md-top-app-bar__leading img {
  height: 36px;
  border-radius: var(--md-shape-sm);
}

.md-top-app-bar__nav { display: flex; gap: 4px; }
.md-top-app-bar__nav a {
  position: relative;
  padding: 8px 16px;
  border-radius: var(--md-shape-full);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--md-on-surface-variant);
  transition: background var(--md-duration-short), color var(--md-duration-short);
}
.md-top-app-bar__nav a:hover {
  background: color-mix(in srgb, var(--md-on-surface) 8%, transparent);
}
.md-top-app-bar__nav a.active {
  color: var(--md-on-surface);
  background: var(--md-secondary-container);
}

.md-top-app-bar__cta {
  padding: 10px 20px !important;
  font-size: 14px !important;
}

@media (max-width: 900px) {
  .md-top-app-bar__nav { display: none; }
  .md-top-app-bar { padding: 0 16px; }
}

/* ===== Buttons ===== */
.md-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--md-shape-full);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  user-select: none;
  transition: box-shadow var(--md-duration-short), background var(--md-duration-short), transform var(--md-duration-short);
  white-space: nowrap;
}
.md-button .material-symbols-rounded { font-size: 18px; }
.md-button:hover { transform: translateY(-1px); }
.md-button:active { transform: translateY(0); }

.md-button--filled {
  background: var(--md-primary);
  color: var(--md-on-primary);
  box-shadow: var(--md-elevation-1);
}
.md-button--filled:hover {
  background: color-mix(in srgb, var(--md-primary) 92%, white);
  box-shadow: var(--md-elevation-2);
}

.md-button--tonal {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}
.md-button--tonal:hover { box-shadow: var(--md-elevation-1); }

.md-button--outlined {
  background: transparent;
  color: var(--md-primary);
  border: 1px solid var(--md-outline);
}
.md-button--outlined:hover {
  background: color-mix(in srgb, var(--md-primary) 8%, transparent);
}

.md-button--large { padding: 14px 28px; font-size: 15px; }

/* ===== Store Badges (App Store / Google Play) ===== */
.md-store-badge {
  display: flex;
  border-radius: var(--md-shape-md);
  overflow: hidden;
  transition: transform var(--md-duration-short), box-shadow var(--md-duration-short);
}
.md-store-badge img {
  width: 100%;
  height: auto;
  display: block;
}
.md-store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.md-store-badge:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ===== Chip ===== */
.md-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--md-shape-sm);
  background: var(--md-surface-container-high);
  color: var(--md-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--md-outline-variant);
}
.md-chip .material-symbols-rounded { font-size: 16px; }
.md-chip--brand {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
  border-color: transparent;
}

/* ===== Hero ===== */
.md-hero {
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0;
}
.md-hero__content h1 span {
  background: linear-gradient(135deg, var(--md-primary), var(--md-tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.md-hero__subtitle {
  margin: 20px 0 32px;
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--md-on-surface-variant);
  max-width: 560px;
}
.md-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.md-hero__visual { display: flex; justify-content: center; align-items: center; }
.md-hero__visual img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(103, 80, 164, 0.25));
}

@media (max-width: 900px) {
  .md-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 0;
    min-height: auto;
  }
  .md-hero__subtitle { margin-left: auto; margin-right: auto; }
  .md-hero__actions { justify-content: center; }
  .md-hero__visual { order: -1; }
  .md-hero__visual img { max-height: 280px; }
}

/* ===== Section ===== */
.md-section { padding: 80px 0; }
.md-section__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.md-section__lead {
  margin-top: 12px;
  font-size: 17px;
  color: var(--md-on-surface-variant);
}
.md-subsection-title {
  text-align: center;
  margin: 48px 0 24px;
  color: var(--md-on-surface);
}

/* ===== Flutter Card ===== */
.md-card--flutter {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0;
  background: var(--md-surface-container-low);
  border-radius: var(--md-shape-xl);
  overflow: hidden;
  box-shadow: var(--md-elevation-1);
  transition: box-shadow var(--md-duration-medium);
}
.md-card--flutter:hover { box-shadow: var(--md-elevation-2); }

.md-card__media {
  background: linear-gradient(135deg, var(--md-primary), var(--md-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  min-height: 320px;
}
.md-card__media img {
  max-width: 220px;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.3));
}

.md-card__body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.md-card__body h3 { color: var(--md-on-surface); }
.md-card__body p { color: var(--md-on-surface-variant); font-size: 15px; }

.md-card__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

@media (max-width: 900px) {
  .md-card--flutter { grid-template-columns: 1fr; }
  .md-card__media { min-height: 220px; padding: 32px; }
  .md-card__body { padding: 28px; }
}

/* ===== Dating Section ===== */
.md-section--dating {
  background: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 50%, #1a0b2e 100%);
  color: var(--md-surface);
  border-radius: var(--md-shape-xl);
  padding: 64px 48px;
  position: relative;
  overflow: hidden;
  margin: 40px 24px;
  max-width: 1232px;
  margin-left: auto;
  margin-right: auto;
}
.md-section--dating::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.3), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.md-section--dating::after {
  content: "";
  position: absolute;
  bottom: -30%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(189, 109, 226, 0.25), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.dating-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.dating-content h2 {
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.dating-content h2 span {
  background: linear-gradient(135deg, #ff6b9d, #bd6de2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dating-content > p {
  margin: 16px 0 28px;
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 540px;
}

.dating-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dating-feature {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--md-shape-md);
  transition: all var(--md-duration-short);
}
.dating-feature:hover {
  background: rgba(255,255,255,0.12);
  transform: translateX(4px);
  border-color: rgba(233, 69, 96, 0.5);
}
.dating-feature__icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e94560, #bd6de2);
  border-radius: var(--md-shape-sm);
  display: flex; align-items: center; justify-content: center;
  color: #ffffff;
}
.dating-feature__icon .material-symbols-rounded {
  font-size: 24px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}
.dating-feature__text h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.dating-feature__text p { font-size: 13px; opacity: 0.85; line-height: 1.4; }

/* Dating App Card */
.dating-app-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--md-shape-xl);
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}
.dating-app-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.dating-app-card__icon {
  width: 56px; height: 56px;
  border-radius: var(--md-shape-md);
  display: flex; align-items: center; justify-content: center;
}
.dating-app-card__header h3 { font-size: 22px; font-weight: 600; }
.dating-app-card__header span { font-size: 12px; opacity: 0.8; }

.dating-app-card__screenshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.dating-screenshot {
  aspect-ratio: 9/16;
  border-radius: var(--md-shape-sm);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  transition: transform var(--md-duration-short);
  background: #0f0518;
}
.dating-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dating-screenshot:hover { transform: translateY(-4px); }

.dating-app-card__downloads {
  display: flex;
justify-content: center;
  gap: 12px;
}

/* ===== Mobile Adaptation for Dating Section ===== */
@media (max-width: 1024px) {
  .md-section--dating {
    padding: 48px 32px;
    margin: 32px 20px;
  }
  
  .dating-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .dating-content {
    text-align: center;
  }
  
  .dating-content > p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .dating-features {
    max-width: 600px;
    margin: 0 auto;
    grid-template-columns: 1fr 1fr;
  }
  
  .dating-app-card {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .md-section--dating {
    padding: 40px 20px;
    margin: 24px 16px;
    border-radius: var(--md-shape-lg);
  }
  
  .dating-container {
    gap: 32px;
  }
  
  .dating-content h2 {
    font-size: 26px;
  }
  
  .dating-content > p {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  .dating-features {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .dating-feature {
    padding: 16px;
    gap: 12px;
  }
  
  .dating-feature__icon {
    width: 40px;
    height: 40px;
  }
  
  .dating-feature__icon .material-symbols-rounded {
    font-size: 22px;
  }
  
  .dating-feature__text h3 {
    font-size: 14px;
  }
  
  .dating-feature__text p {
    font-size: 13px;
  }
  
  .dating-app-card {
    padding: 24px 20px;
  }
  
  .dating-app-card__header {
    justify-content: center;
    text-align: center;
  }
  
  .dating-app-card__icon {
    width: 52px;
    height: 52px;
  }
  
  .dating-app-card__header h3 {
    font-size: 20px;
  }
  
  .dating-app-card__screenshots {
    gap: 8px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .md-section--dating {
    padding: 32px 16px;
    margin: 20px 12px;
  }
  
  .md-section--dating::before,
  .md-section--dating::after {
    display: none;
  }
  
  .dating-content h2 {
    font-size: 24px;
    line-height: 1.25;
  }
  
  .dating-content > p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .dating-features {
    gap: 10px;
  }
  
  .dating-feature {
    padding: 14px 12px;
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .dating-feature__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
  }
  
  .dating-feature__text h3 {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .dating-feature__text p {
    font-size: 12px;
    line-height: 1.4;
  }
  
  .dating-app-card {
    padding: 20px 16px;
    border-radius: var(--md-shape-lg);
  }
  
  .dating-app-card__header {
    flex-direction: column;
    gap: 12px;
  }
  
  .dating-app-card__icon {
    width: 64px;
    height: 64px;
  }
  
  .dating-app-card__header h3 {
    font-size: 22px;
  }
  
  .dating-app-card__header span {
    font-size: 13px;
  }
  
  .dating-app-card__screenshots {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  
  .dating-screenshot {
    aspect-ratio: 9/16;
  }
  
  .dating-app-card__downloads {
    gap: 10px;
  }
  
  .md-store-badge {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .dating-content h2 {
    font-size: 22px;
  }
  
  .dating-app-card__screenshots {
    gap: 4px;
  }
  
  .dating-screenshot {
    border-radius: var(--md-shape-xs);
  }
}

/* ===== Works Carousel ===== */
.md-works-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.md-works-carousel__viewport {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0;
}
.md-works-carousel__viewport::-webkit-scrollbar { display: none; }

.md-works-carousel__track {
  display: flex;
  gap: 20px;
}

.md-works-carousel__btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--md-shape-full);
  background: var(--md-surface-container-high);
  color: var(--md-on-surface);
  border: 1px solid var(--md-outline-variant);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--md-duration-short);
  box-shadow: var(--md-elevation-1);
}
.md-works-carousel__btn .material-symbols-rounded {
  font-size: 24px;
}
.md-works-carousel__btn:hover:not(:disabled) {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
  box-shadow: var(--md-elevation-2);
  transform: scale(1.05);
}
.md-works-carousel__btn:active:not(:disabled) {
  transform: scale(0.95);
}
.md-works-carousel__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.md-work-card {
  flex: 0 0 calc((100% - 40px) / 3);
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--md-shape-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--md-surface);
  box-shadow: var(--md-elevation-1);
  transition: transform var(--md-duration-short), box-shadow var(--md-duration-short);
}
.md-work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--md-elevation-3);
}
.md-work-card__media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--md-duration-medium);
}
.md-work-card:hover .md-work-card__media { transform: scale(1.05); }
.md-work-card__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 60%);
}
.md-work-card__label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px;
  z-index: 1;
}
.md-work-card__label h4 { font-size: 20px; font-weight: 600; margin-bottom: 2px; }
.md-work-card__label span {
  font-size: 12px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1024px) {
  .md-work-card { flex: 0 0 calc((100% - 20px) / 2); }
}
@media (max-width: 700px) {
  .md-work-card { flex: 0 0 85%; }
  .md-works-carousel__btn { display: none; }
  .md-works-carousel { gap: 0; }
}

/* ===== Modal ===== */
.md-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--md-duration-short);
}
.md-modal:target { opacity: 1; pointer-events: auto; }
.md-modal__dialog {
  background: var(--md-surface-container-low);
  border-radius: var(--md-shape-xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--md-elevation-4);
  transform: scale(0.95);
  transition: transform var(--md-duration-medium) var(--md-motion-emphasized);
}
.md-modal:target .md-modal__dialog { transform: scale(1); }

.md-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--md-surface-container);
  text-decoration: none;
  color: var(--md-on-surface);
  border-bottom: 1px solid var(--md-outline-variant);
}
.md-modal__header .material-symbols-rounded {
  font-size: 22px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--md-shape-full);
  transition: background var(--md-duration-short);
}
.md-modal__header:hover .material-symbols-rounded {
  background: color-mix(in srgb, var(--md-on-surface) 8%, transparent);
}
.md-modal__header h3 { font-size: 18px; font-weight: 500; }

.md-modal__body {
  padding: 20px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.md-modal__body img {
  height: 60vh;
  background: var(--md-surface-container-low);
  flex-shrink: 0;
}

/* ===== Footer ===== */
.md-footer {
  background: var(--md-surface-container);
  margin-top: 80px;
  padding: 64px 0 32px;
}
.md-footer__top {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--md-outline-variant);
}

.md-footer__brand h2 { font-size: 28px; margin-bottom: 8px; }
.md-footer__brand p { color: var(--md-on-surface-variant); }

.md-footer__contacts h3 { font-size: 22px; margin-bottom: 20px; }
.md-footer__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.md-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
  color: var(--md-on-surface-variant);
}

@media (max-width: 900px) {
  .md-footer__top { grid-template-columns: 1fr; gap: 32px; }
  .md-footer__bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ===== Fade-in animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--md-duration-long) var(--md-motion-emphasized),
              transform var(--md-duration-long) var(--md-motion-emphasized);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 3px solid var(--md-primary);
  outline-offset: 2px;
  border-radius: var(--md-shape-xs);
}

/* ===== Cookie Banner ===== */
.md-cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--md-surface-container-highest);
  border-radius: var(--md-shape-xl);
  box-shadow: var(--md-elevation-3);
  z-index: 2000;
  opacity: 0;
  transform: translateY(100px);
  transition: opacity var(--md-duration-medium) var(--md-motion-emphasized),
              transform var(--md-duration-medium) var(--md-motion-emphasized);
  pointer-events: none;
}
.md-cookie-banner.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.md-cookie-banner__content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}
.md-cookie-banner__icon {
  font-size: 32px;
  color: var(--md-primary);
  flex-shrink: 0;
}
.md-cookie-banner__text {
  flex: 1;
}
.md-cookie-banner__text h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--md-on-surface);
}
.md-cookie-banner__text p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--md-on-surface-variant);
  margin: 0;
}
.md-cookie-banner__text a {
  color: var(--md-primary);
  text-decoration: underline;
}
.md-cookie-banner__actions {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .md-cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
  .md-cookie-banner__content {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }
  .md-cookie-banner__actions {
    width: 100%;
  }
  .md-cookie-banner__actions .md-button {
    width: 100%;
  }
}

/* =========================================================
   DARK THEME — Material Design 3
   ========================================================= */


:root[data-theme="dark"] {
  /* Primary */
  --md-primary: #D0BCFF;
  --md-on-primary: #381E72;
  --md-primary-container: #4F378B;
  --md-on-primary-container: #EADDFF;

  /* Secondary */
  --md-secondary: #CCC2DC;
  --md-on-secondary: #332D41;
  --md-secondary-container: #4A4458;
  --md-on-secondary-container: #E8DEF8;

  /* Tertiary */
  --md-tertiary: #EFB8C8;
  --md-on-tertiary: #492532;
  --md-tertiary-container: #633B48;
  --md-on-tertiary-container: #FFD9E4;

  /* Surfaces */
  --md-surface: #141218;
  --md-surface-dim: #141218;
  --md-surface-bright: #3B383E;
  --md-surface-container-lowest: #0F0D13;
  --md-surface-container-low: #1D1B20;
  --md-surface-container: #211F26;
  --md-surface-container-high: #2B2930;
  --md-surface-container-highest: #36343B;
  --md-on-surface: #E6E1E5;
  --md-on-surface-variant: #CAC4D0;
  --md-outline: #938F99;
  --md-outline-variant: #49454F;

  /* Error */
  --md-error: #F2B8B5;
  --md-on-error: #601410;
}

/* Плавные переходы при смене темы */
body,
.md-top-app-bar,
.md-button,
.md-chip,
.md-card--flutter,
.md-work-card,
.md-modal__dialog,
.md-footer,
.dating-feature,
.dating-app-card,
.md-cookie-banner {
  transition: background-color var(--md-duration-medium) var(--md-motion-standard),
              color var(--md-duration-medium) var(--md-motion-standard),
              border-color var(--md-duration-medium) var(--md-motion-standard),
              box-shadow var(--md-duration-medium) var(--md-motion-standard);
}

/* ===== Dark Theme Overrides ===== */


:root[data-theme="dark"] body {
  color: #E6E1E5;
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4 {
  color: #E6E1E5;
}

:root[data-theme="dark"] p {
  color: #CAC4D0;
}

:root[data-theme="dark"] .md-overline {
  color: #D0BCFF;
}

:root[data-theme="dark"] .md-section__lead {
  color: #CAC4D0;
}

:root[data-theme="dark"] .md-subsection-title {
  color: #E6E1E5;
}


/* ===== Card Content — Dark Mode ===== */

:root[data-theme="dark"] .md-card__body h3 {
  color: #E6E1E5;
}

:root[data-theme="dark"] .md-card__body p {
  color: #CAC4D0;
}

/* ===== Dating Section — Dark Mode ===== */

:root[data-theme="dark"] .dating-content h2 {
  color: #E6E1E5;
}

:root[data-theme="dark"] .dating-content > p {
  color: #CAC4D0;
  opacity: 1;
}

:root[data-theme="dark"] .dating-feature__text h3 {
  color: #E6E1E5;
}

:root[data-theme="dark"] .dating-feature__text p {
  color: #CAC4D0;
  opacity: 0.9;
}

:root[data-theme="dark"] .dating-app-card__header h3 {
  color: #E6E1E5;
}

:root[data-theme="dark"] .dating-app-card__header span {
  color: #CAC4D0;
  opacity: 0.9;
}

:root[data-theme="dark"] .dating-screenshot small {
  color: #CAC4D0;
  opacity: 0.9;
}

/* ===== Work Cards — Dark Mode ===== */

:root[data-theme="dark"] .md-work-card__label h4 {
  color: #E6E1E5;
}

:root[data-theme="dark"] .md-work-card__label span {
  color: #CAC4D0;
  opacity: 0.9;
}


/* Top App Bar */
:root[data-theme="dark"] .md-top-app-bar {
  background: var(--md-surface);
}
:root[data-theme="dark"] .md-top-app-bar.scrolled {
  background: var(--md-surface-container);
}

/* Hero */
:root[data-theme="dark"] .md-hero__visual img {
  filter: drop-shadow(0 20px 40px rgba(208, 188, 255, 0.2));
}

/* Flutter Card */
:root[data-theme="dark"] .md-card--flutter {
  background: var(--md-surface-container-low);
}

/* Dating Section — в темной теме делаем фон ещё темнее */
:root[data-theme="dark"] .md-section--dating {
  background: linear-gradient(135deg, #0a0414 0%, #1a0b2e 50%, #0a0414 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .dating-feature {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}
:root[data-theme="dark"] .dating-feature:hover {
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .dating-app-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .dating-screenshot {
  background: #1a0b2e;
}

/* Works */
:root[data-theme="dark"] .md-work-card__media::after {
  background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}

/* Modal */
:root[data-theme="dark"] .md-modal {
  background: rgba(0, 0, 0, 0.7);
}

/* Store badges — в темной теме темнее */
:root[data-theme="dark"] .md-store-badge {
  background: #1a1a1a;
  filter: brightness(0.95);
}

/* Cookie banner */
:root[data-theme="dark"] .md-cookie-banner {
  background: var(--md-surface-container-highest);
  border: 1px solid var(--md-outline-variant);
}

/* SVG иконки в кнопках — наследуют цвет */
:root[data-theme="dark"] .md-button svg {
  color: currentColor;
}

:root[data-theme="dark"] .md-chip svg {
  color: var(--md-on-surface-variant);
}

/* ===== Theme Toggle Button ===== */
.md-top-app-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.md-icon-button {
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-full);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-on-surface-variant);
  position: relative;
  overflow: hidden;
  transition: background var(--md-duration-short);
}
.md-icon-button:hover {
  background: color-mix(in srgb, var(--md-on-surface) 8%, transparent);
}
.md-icon-button:active {
  background: color-mix(in srgb, var(--md-on-surface) 12%, transparent);
}

.md-icon-button .material-symbols-rounded {
  font-size: 22px;
  position: absolute;
  transition: transform var(--md-duration-medium) var(--md-motion-emphasized),
              opacity var(--md-duration-short);
}

/* По умолчанию светлая тема — показываем иконку "dark_mode" (переключиться в темную) */
.theme-icon-dark {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
.theme-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* В темной теме — показываем "light_mode" (переключиться в светлую) */
:root[data-theme="dark"] .theme-icon-light {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
:root[data-theme="dark"] .theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

@media (max-width: 900px) {
  .md-top-app-bar__actions {
    gap: 4px;
  }
  .md-top-app-bar__cta {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
}


[data-theme="dark"] .md-top-app-bar__leading img {
  filter: brightness(0) invert(1);
  /* или */
}