
/* ===============================
   AI Work Exchange - Base Styles
   Tech palette: light with blue/purple accents
   Font stack: Inter / Poppins / system fallback
   Pure CSS, no frameworks.
================================== */

:root{
  --bg: #f7f9fc;
  --bg-soft: #ffffff;
  --text: #0f172a;
  --muted: #5b6473;
  --border: rgba(15, 23, 42, 0.08);
  --card: #ffffff;
  --shadow: 0 10px 20px rgba(20, 20, 43, 0.08), 0 2px 6px rgba(20,20,43,.06);
  --shadow-hover: 0 20px 40px rgba(20, 20, 43, 0.15), 0 4px 12px rgba(20,20,43,.1);
  --glow: 0 0 0 3px rgba(99,102,241,.15);
  --primary: #6d5efc;
  --primary-2: #40c9ff;
  --accent: linear-gradient(135deg, #6d5efc 0%, #40c9ff 100%);
  --accent-hover: linear-gradient(135deg, #5a4fdb 0%, #2bb3ff 100%);
  --chip-bg: rgba(109,94,252,.12);
  --chip-tx: #4b3cf0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --link: #375dfb;
  --ring: rgba(109,94,252,.25);
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

:root[data-theme="dark"]{
  --bg: #0b1020;
  --bg-soft: #0f172a;
  --text: #e5e7eb;
  --muted: #aeb6c2;
  --border: rgba(148, 163, 184, 0.12);
  --card: #0f1730;
  --shadow: 0 10px 22px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.25);
  --shadow-hover: 0 20px 40px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
  --glow: 0 0 0 3px rgba(99,102,241,.25);
  --chip-bg: rgba(99,102,241,.18);
  --chip-tx: #bfc5ff;
  --link: #7aa2ff;
  --gradient-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --gradient-card: linear-gradient(145deg, #0f1730 0%, #1a1f3a 100%);
}

*{ box-sizing: border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: Inter, Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  background:
    radial-gradient(1400px 800px at 5% -5%, rgba(109,94,252,0.25), transparent 70%),
    radial-gradient(1200px 600px at 95% 10%, rgba(64,201,255,0.2), transparent 65%),
    radial-gradient(800px 400px at 50% 100%, rgba(118,75,162,0.15), transparent 60%),
    linear-gradient(135deg, #f7f9fc 0%, #e8f2ff 50%, #f0f4ff 100%);
  color: var(--text);
  line-height:1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  width: min(1200px, 94vw);
  margin-inline: auto;
}

.header{
  position: sticky; top:0; z-index:100;
  background: color-mix(in oklab, var(--bg), transparent 8%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(109,94,252,0.05) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header:hover::before {
  opacity: 1;
}

.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding: .9rem 0;
  gap: 1rem;
  flex-wrap: nowrap; /* prevent wrapping so Sign In stays inline */
}

.brand{
  display:flex; align-items:center; gap:.75rem; font-weight:700; letter-spacing:.3px; text-decoration:none; color:var(--text); transition:all 0.3s ease; border-radius:12px; padding:0.5rem; position:relative; overflow:hidden;
}
.brand:hover{
  transform:translateY(-2px); color:var(--accent);
}
.brand::before{
  content:''; position:absolute; top:0; left:0; right:0; bottom:0; background:linear-gradient(135deg, rgba(109,94,252,0.1), rgba(59,130,246,0.1)); opacity:0; transition:opacity 0.3s ease; border-radius:12px;
}
.brand:hover::before{
  opacity:1;
}
.brand .logo{
  width:42px; height:42px; flex:0 0 auto;
  border-radius:14px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  box-shadow: 0 8px 25px rgba(109,94,252,.3), inset 0 0 0 1px rgba(255,255,255,.3);
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  display:flex; align-items:center; justify-content:center;
}
.brand .logo::before{
  content:''; position:absolute; top:0; left:0; right:0; bottom:0; background:linear-gradient(135deg, rgba(255,255,255,0.2), transparent); opacity:0; transition:opacity 0.3s ease; border-radius:14px;
}
.brand .logo:hover::before{
  opacity:1;
}
.brand .logo svg{
  width:20px; height:20px; transition:transform 0.3s ease; color:white; filter:drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.brand:hover .logo svg{
  transform:scale(1.1) rotate(5deg);
  filter:drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.brand:hover .logo{
  transform:scale(1.05); box-shadow:0 12px 35px rgba(109,94,252,0.4);
}

/* Logo animation on page load */
@keyframes logoGlow {
  0% { box-shadow: 0 8px 25px rgba(109,94,252,.3), inset 0 0 0 1px rgba(255,255,255,.3); }
  50% { box-shadow: 0 8px 25px rgba(109,94,252,.5), inset 0 0 0 1px rgba(255,255,255,.5), 0 0 20px rgba(109,94,252,0.3); }
  100% { box-shadow: 0 8px 25px rgba(109,94,252,.3), inset 0 0 0 1px rgba(255,255,255,.3); }
}

.brand .logo {
  animation: logoGlow 2s ease-in-out 0.5s;
}

.brand .name{ font-size:1.05rem; }

.menu{ display:flex; gap:1.2rem; align-items:center; flex-wrap: wrap; }
.menu a{ 
  color: var(--muted); 
  font-weight:500; 
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.menu a:hover {
  color: var(--text);
  background: color-mix(in oklab, var(--card), transparent 20%);
  transform: translateY(-1px);
}

.menu a.active{ 
  color: var(--text); 
  background: color-mix(in oklab, var(--primary), transparent 90%);
  font-weight: 600;
}

.menu a:active {
  transform: scale(0.95);
}

.btn{
  display:inline-flex; 
  align-items:center; 
  justify-content:center;
  gap:.5rem; 
  border:1px solid var(--border);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: .7rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  cursor:pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  line-height: 2;
  text-align: center;
  vertical-align: middle;
  min-height: 2.5rem;
}

.btn > * {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Сброс стилей для ссылок-кнопок */
a.btn {
  text-decoration: none;
  line-height: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

a.btn:hover {
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover{ 
  transform: translateY(-2px) scale(1.02); 
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:focus-visible{ outline: none; box-shadow: var(--glow); }

.btn.primary{
  background: var(--accent); 
  color: white; 
  border: none;
  box-shadow: 0 8px 25px rgba(109,94,252,.3);
}

.btn.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 12px 35px rgba(109,94,252,.4);
}

.btn.ghost{ 
  background: color-mix(in oklab, var(--card), transparent 20%);
  box-shadow:none; 
  border: 1px solid var(--border);
}

.btn.ghost:hover {
  background: color-mix(in oklab, var(--card), transparent 10%);
  border-color: var(--border);
}

/* Desktop - все кнопки видны */
@media (min-width: 769px) {
  .header-actions .btn.primary {
    display: inline-flex !important;
  }
}

/* Дополнительное выравнивание для мобильных устройств */
@media (max-width: 768px) {
  .btn {
    padding: .75rem 1.25rem;
    min-height: 2.75rem;
  }
}

/* Layout */
.main-grid{
  display:grid; gap: 1.4rem;
  grid-template-columns: 1fr;
  padding: 1.2rem 0 2rem;
}
@media (min-width: 980px){
  .main-grid{ grid-template-columns: 1.9fr .95fr; align-items:start; }
}

/* Controls / Filters */
.controls{
  display:flex; gap:.6rem; flex-wrap: wrap; align-items:center;
  margin-bottom: .6rem;
}
.input, .select{
  border:1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  padding:.65rem .8rem;
  box-shadow: var(--shadow);
  min-width: 10ch;
}
.select{ padding-right: 2rem; }
.input::placeholder{ color: color-mix(in oklab, var(--muted), transparent 10%); }

.spacer{ flex:1 1 auto; }

/* Stream */
.stream{
  display:grid; gap:.9rem;
}
.task-card{
  position: relative;
  border:1px solid var(--border);
  background: var(--gradient-card);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  cursor: pointer;
}

.task-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.task-card:hover::before {
  transform: scaleX(1);
}

.task-card:hover{ 
  transform: translateY(-4px) scale(1.01); 
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in oklab, var(--primary), transparent 70%);
}

.task-card:active {
  transform: translateY(-2px) scale(0.99);
}

/* User's own tasks highlighting */
.task-card.user-task {
  border: 2px solid #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
  position: relative;
}

.task-card.user-task::before {
  content: 'Your Task';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #10b981;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}
.task-header{
  display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:.35rem;
}
.chip{
  display:inline-flex; align-items:center; gap:.4rem;
  font-size:.8rem; font-weight:600; letter-spacing:.2px;
  padding:.35rem .7rem; border-radius: 999px;
  color: var(--chip-tx); 
  background: var(--chip-bg);
  border: 1px solid color-mix(in oklab, var(--chip-tx), transparent 80%);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chip-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
}

.chip-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
  60% { transform: translateY(-2px); }
}

.chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.chip:hover::before {
  left: 100%;
}

.chip:hover {
  transform: scale(1.05);
  background: color-mix(in oklab, var(--chip-bg), var(--chip-tx) 20%);
  box-shadow: 0 4px 12px rgba(109,94,252,.2);
}

.task-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.task-card:hover .task-actions {
  opacity: 1;
  transform: translateY(0);
}

.btn-apply {
  flex: 1;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-apply:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.badge{
  font-weight:700; letter-spacing:.2px; font-size:.95rem;
}
.task-card h3{ margin:.25rem 0 .4rem; font-size:1.05rem; line-height:1.3; }
.task-card p{ margin:0; color: var(--muted); font-size:.95rem; }
.task-meta{
  display:flex; align-items:center; gap:.9rem; margin-top:.7rem; color: var(--muted);
  font-size:.85rem;
}
.task-meta .dot{ width:5px; height:5px; border-radius:50%; background: color-mix(in oklab, var(--muted), transparent 40%); display:inline-block; }

.task-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(109, 94, 252, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.author-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-block;
}


/* Animations */
@keyframes enterDown{
  from{ opacity: 0; transform: translateY(-20px) scale(.95); }
  to  { opacity: 1; transform: translateY(0) scale(1); }
}
.task-card.enter{ animation: enterDown .6s cubic-bezier(.18,.7,.2,1) both; }

@keyframes shiftDown{
  from{ transform: translateY(0); }
  to  { transform: translateY(15px); }
}
.task-card.shift{ animation: shiftDown .3s ease-out; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(109,94,252,.3); }
  50% { box-shadow: 0 0 20px rgba(109,94,252,.6), 0 0 30px rgba(64,201,255,.4); }
}

.pulse { animation: pulse 2s infinite; }
.float { animation: float 3s ease-in-out infinite; }
.glow { animation: glow 2s ease-in-out infinite; }

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Scroll animations */
.animate-in {
  animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced hover effects */
.task-card:hover .chip {
  transform: scale(1.1);
}

.task-card:hover .badge {
  transform: scale(1.05);
}

/* Loading shimmer effect */
.shimmer {
  background: linear-gradient(90deg, 
    color-mix(in oklab, var(--card), transparent 20%) 25%, 
    color-mix(in oklab, var(--card), transparent 5%) 50%, 
    color-mix(in oklab, var(--card), transparent 20%) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Advanced animations */
@keyframes morphing {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50% { border-radius: 50% 30% 60% 40% / 30% 50% 60% 70%; }
  75% { border-radius: 40% 70% 30% 60% / 70% 30% 50% 60%; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 5px rgba(109,94,252,0.3); }
  50% { text-shadow: 0 0 20px rgba(109,94,252,0.6), 0 0 30px rgba(64,201,255,0.4); }
}

@keyframes cardFlip {
  0% { transform: perspective(400px) rotateY(0); }
  50% { transform: perspective(400px) rotateY(180deg); }
  100% { transform: perspective(400px) rotateY(360deg); }
}

@keyframes wave {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(247, 249, 252, 0.75);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  /* Дополнительное центрирование для мобильных устройств */
  padding: 20px;
  box-sizing: border-box;
  /* Принудительное центрирование */
  text-align: center;
}

/* Дополнительный класс для максимального центрирования */
.loading-overlay.centered {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Дополнительная защита для мобильных */
  min-height: 100vh;
  min-height: 100dvh;
}

.loading-overlay.centered .loading-spinner {
  margin: 0 auto;
  display: block;
}

.loading-overlay.centered .loading-text {
  margin: 1.5rem auto 0;
  text-align: center;
  display: block;
}

/* Task Detail Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--hover);
  color: var(--text);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 2rem;
}

.task-detail-section {
  margin-bottom: 2rem;
}

.task-detail-section h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.task-detail-section p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.task-detail-section ul {
  margin: 0;
  padding-left: 1.5rem;
}

.task-detail-section li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--muted);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--hover);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.contact-item:hover {
  background: var(--border);
  transform: translateX(4px);
}

.contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item span {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.safety-warning {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.safety-warning svg {
  width: 20px;
  height: 20px;
  color: #dc2626;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.safety-warning p {
  margin: 0;
  color: #dc2626;
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 500;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  padding: 1rem 2rem 2rem;
  border-top: 1px solid var(--border);
}

.contact-btn {
  flex: 1;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.contact-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.3);
}

.contact-btn svg {
  width: 18px;
  height: 18px;
}

/* Dark theme for modal */
[data-theme="dark"] .modal-content {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="dark"] .safety-warning {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

/* Mobile modal */
@media (max-width: 768px) {
  .modal {
    padding: 0.5rem;
  }
  
  .modal-content {
    max-height: 95vh;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1.5rem;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .contact-btn {
    order: 1;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 1rem;
    margin: 1rem 0;
  }
  
  .header-actions .btn {
    padding: 0 0.65rem;
    font-size: 0.8rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 34px;
    min-height: 34px;
    height: 34px;
    min-width: 65px;
    width: auto;
    font-weight: 600;
    vertical-align: middle;
    text-align: center;
  }
  
  .brand .name {
    display: none; /* Скрываем название на очень маленьких экранах */
  }
  
  .logo img {
    width: 28px !important;
    height: 28px !important;
  }
  
  .stats-grid {
    padding: 0 0.5rem;
  }
  
  .stat-item {
    padding: 1.5rem 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .floating-card {
    width: 100px;
    height: 80px;
    padding: 0.75rem;
    font-size: 0.8rem;
  }
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(109, 94, 252, 0.1);
  border-top-color: #6d5efc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  /* Гарантированное центрирование */
  margin: 0 auto;
  flex-shrink: 0;
  /* Дополнительная защита */
  position: relative;
  display: block;
}

.loading-text {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.7;
  /* Гарантированное центрирование текста */
  text-align: center;
  flex-shrink: 0;
  display: block;
}

/* Альтернативное решение для принудительного центрирования */
.loading-overlay.force-center {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  text-align: center !important;
  z-index: 9999 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.loading-overlay.force-center .loading-spinner {
  position: relative !important;
  margin: 0 !important;
  transform: none !important;
  display: block !important;
}

.loading-overlay.force-center .loading-text {
  position: relative !important;
  margin: 1.5rem 0 0 0 !important;
  transform: none !important;
  display: block !important;
  text-align: center !important;
}

:root[data-theme="dark"] .loading-overlay {
  background: rgba(11, 16, 32, 0.75);
}

/* Универсальное решение для центрирования спиннера */
#loading-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  text-align: center !important;
  z-index: 9999 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(247, 249, 252, 0.75) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
}

#loading-overlay .loading-spinner {
  position: relative !important;
  margin: 0 !important;
  transform: none !important;
  display: block !important;
  width: 60px !important;
  height: 60px !important;
  border: 4px solid rgba(109, 94, 252, 0.1) !important;
  border-top-color: #6d5efc !important;
  border-radius: 50% !important;
  animation: spin 0.8s linear infinite !important;
}

#loading-overlay .loading-text {
  position: relative !important;
  margin: 1.5rem 0 0 0 !important;
  transform: none !important;
  display: block !important;
  text-align: center !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  opacity: 0.7 !important;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(1.05); }
  75% { transform: scale(1.1); }
}

/* Advanced utility classes */
.morphing { animation: morphing 8s ease-in-out infinite; }
.gradient-shift { 
  background: linear-gradient(-45deg, #6d5efc, #40c9ff, #ff6b6b, #4ecdc4);
  background-size: 400% 400%;
  animation: gradientShift 4s ease infinite;
}
.text-glow { animation: textGlow 2s ease-in-out infinite; }
.card-flip { animation: cardFlip 2s ease-in-out infinite; }
.wave { animation: wave 2s ease-in-out infinite; }
.spin { animation: spin 1s linear infinite; }
.heartbeat { animation: heartbeat 1.5s ease-in-out infinite; }

/* Micro-interactions */
.micro-bounce:hover {
  animation: bounce 0.6s ease;
}

.micro-pulse:hover {
  animation: pulse 0.8s ease;
}

.micro-glow:hover {
  animation: glow 1s ease;
}

/* Scroll-triggered animations */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.scroll-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.scroll-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scroll-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Sidebar */
.sidebar .panel{
  border:1px solid var(--border);
  background: var(--gradient-card);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar .panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109,94,252,0.02) 0%, rgba(64,201,255,0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar .panel:hover::before {
  opacity: 1;
}

.sidebar .panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in oklab, var(--primary), transparent 80%);
}

.sidebar .panel + .panel{ margin-top: 1rem; }

.stats{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:.7rem;
}
.stat{
  border-radius: 16px; padding:1rem;
  background: color-mix(in oklab, var(--card), rgba(109,94,252,.08) 8%);
  border:1px solid color-mix(in oklab, var(--border), rgba(109,94,252,.2) 40%);
  text-align:center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109,94,252,0.05) 0%, rgba(64,201,255,0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat:hover::before {
  opacity: 1;
}

.stat:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(109,94,252,.15);
  border-color: color-mix(in oklab, var(--primary), transparent 60%);
}
.stat .value{
  font-size:1.85rem; font-weight:800;
  padding: 0 0.45rem;
  display:inline-block;
  min-width:3.5ch;
  text-align:center;
  box-sizing: border-box;
  background: var(--accent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .label{ color: var(--muted); font-size:.85rem; }

/* Slight left shift for center statistic */
.stats .stat:nth-child(2) .value,
.stats .stat:nth-child(2) .label{
  transform: translateX(-4px);
}

.popular{
  display:grid; gap:.65rem;
}
.cat{
  display:flex; align-items:center; justify-content:space-between; gap:.75rem;
  border:1px solid var(--border);
  background: color-mix(in oklab, var(--card), rgba(64,201,255,.06) 6%);
  border-radius: 12px; padding:.6rem .7rem;
}
.cat .left{ display:flex; align-items:center; gap:.6rem; }
.cat .icon{ width:32px; height:32px; border-radius:10px; display:grid; place-items:center; background: var(--bg); border:1px solid var(--border); }
.cat .name{ font-weight:600; }
.cat .count{ color: var(--muted); font-size:.9rem; }

/* promo block removed */

/* Footer */
.footer{
  margin-top: 1.2rem;
  border-top:1px solid var(--border);
  padding: 1rem 0 1.5rem;
  color: var(--muted);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  width: 100%;
  text-align: center;
}

.footer-section{max-width:420px;}

@media (min-width: 768px){
  .footer-content{
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }
  .footer-section{flex: 1 1 0;}
}

/* Refined footer links – light, без коробок */
.footer .footer-links{
  display:flex;
  gap:1rem;
  flex-wrap:wrap;
  justify-content:flex-start;
  padding:0;
  background:transparent;
  border:none;
}
@media (max-width: 767px){
  .footer .footer-links{justify-content:center;}
}
.footer .footer-links a{
  color: var(--accent);
  font-weight:500;
  position:relative;
  padding:.25rem 0;
}
.footer .footer-links a::before{display:none;}
.footer .footer-links a:hover{color:var(--primary-dark, #5d4dfa);} 

/* Footer bottom stripe */
.footer-bottom{
  margin-top:1.5rem;
  padding-top:1rem;
  border-top:1px solid var(--border);
  text-align:center;
  font-size:0.9rem;
  color: var(--muted);
}
.subscribe{
  display:flex;
  flex-wrap: nowrap;
  gap:0.75rem;
  align-items:center;
  margin-bottom: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 16px;
  border: 1px solid rgba(109, 94, 252, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}
.subscribe::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109,94,252,0.05) 0%, rgba(64,201,255,0.05) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.subscribe::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(109,94,252,0.3) 0%, rgba(64,201,255,0.3) 100%);
  border-radius: 18px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.subscribe:hover::after {
  opacity: 1;
}

.subscribe:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.subscribe .input{
  flex: 1 0 250px;
  min-width: 200px;
  padding: 0.75rem 1rem;
  height: 2.5rem;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(109, 94, 252, 0.3);
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.subscribe .input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(109, 94, 252, 0.15);
  background: white;
}
.subscribe .btn {
  padding: 0.75rem 1.5rem;
  height: 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  min-width: 120px;
  background: linear-gradient(135deg, var(--accent) 0%, #8B7CFF 100%);
  color: white;
  border: none;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(109, 94, 252, 0.4);
  cursor: pointer;
}
.subscribe .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.5);
  background: linear-gradient(135deg, #8B7CFF 0%, var(--accent) 100%);
}
.footer-controls {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(109, 94, 252, 0.15);
}

.footer-links{
  display:flex;
  gap:1.5rem;
  flex-wrap:wrap;
  justify-content: center;
  margin-top:1.5rem;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(109, 94, 252, 0.1);
  font-size:0.95rem;
}

/* Toggle Switch */
.switch{
  position: relative; display:inline-flex; align-items:center; gap:.25rem; user-select:none;
}
.switch input{ display:none; }
.switch .track{
  width:36px; height:20px; border:1px solid var(--border); background: var(--card); border-radius:999px; box-shadow: var(--shadow); position:relative;
}
.switch .thumb{
  position:absolute; top:50%; left:2px; transform: translateY(-50%);
  width:16px; height:16px; border-radius:50%; background: var(--accent); box-shadow: 0 2px 6px rgba(109,94,252,.35);
  transition: left .22s ease;
}
.switch input:checked + .track .thumb{ left:18px; }

/* Forms */
.form{
  display:grid; gap:.8rem;
}
.label{ font-weight:600; font-size:.92rem; }
.textarea{
  border:1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 12px; padding:.75rem .85rem; min-height: 120px; resize: vertical; box-shadow: var(--shadow);
}

/* Page shells */
.page-hero{
  padding: 3rem 0 2rem;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 60vh;
}

@media (min-width: 1024px) {
  .page-hero {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(109,94,252,0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero-content {
  text-align: center;
}

@media (min-width: 1024px) {
  .hero-content {
    text-align: left;
  }
}

.page-hero h1{ 
  margin:.2rem 0; 
  font-size:2.5rem; 
  font-weight: 800;
  background: var(--accent);
  -webkit-background-clip: text; 
  background-clip: text; 
  color: transparent;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .page-hero h1 {
    font-size: 3rem;
  }
}

.page-hero p{ 
  margin:1rem 0 2rem; 
  color:var(--muted); 
  font-size: 1.2rem;
  max-width: 600px;
  margin: 1rem auto 2rem;
  line-height: 1.6;
}

@media (min-width: 1024px) {
  .page-hero p {
    margin: 1rem 0 2rem;
  }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

@media (min-width: 1024px) {
  .hero-stats {
    justify-content: flex-start;
  }
}

.hero-stat {
  text-align: center;
  padding: 1rem;
  background: var(--gradient-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  min-width: 120px;
}

.hero-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.hero-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: #6d5efc; /* Fallback для старых браузеров */
  background: var(--accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Только для браузеров с поддержкой background-clip */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero-number {
    color: transparent;
  }
}

.hero-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .hero-actions {
    justify-content: flex-start;
  }
}

.btn.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-card {
  position: absolute;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: float 6s ease-in-out infinite;
}

.floating-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: var(--shadow-hover);
  animation-play-state: paused;
}

.card-1 {
  animation-delay: 0s;
}

.card-2 {
  animation-delay: 2s;
}

.card-3 {
  animation-delay: 4s;
}

.card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.card-text {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.card-1 {
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  animation: float 3s ease-in-out infinite;
}

.card-2 {
  top: 50%;
  right: 20%;
  transform: translateY(-50%);
  animation: float 3s ease-in-out infinite 1s;
}

.card-3 {
  top: 50%;
  left: 30%;
  transform: translateY(-50%);
  animation: float 3s ease-in-out infinite 2s;
}

.grid{
  display:grid; gap:.8rem;
}
@media(min-width:860px){
  .grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
  .grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
}

/* Toast */
.toast{
  position: fixed; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  z-index: 2000;
  background: var(--card); 
  border: 1px solid var(--border); 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  padding: 1.2rem 1.8rem; 
  border-radius: 16px; 
  display: none;
  max-width: 400px;
  width: 90%;
  text-align: center;
  font-weight: 500;
  backdrop-filter: blur(10px);
}
.toast.show{ 
  display: block; 
  animation: toastEnter .4s cubic-bezier(0.18, 0.7, 0.2, 1) both; 
}

/* Error toast styling */
.toast.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.15);
}

.toast.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
  box-shadow: 0 20px 40px rgba(22, 163, 74, 0.15);
}

.toast.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

@keyframes toastEnter {
  from { 
    opacity: 0; 
    transform: translate(-50%, -50%) scale(0.8); 
  }
  to { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1); 
  }
}

/* New task animation */
@keyframes newTaskPulse {
  0% { 
    transform: scale(1); 
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
  }
  50% { 
    transform: scale(1.02); 
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
  }
  100% { 
    transform: scale(1); 
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
  }
}

.task-card.new-task {
  animation: newTaskPulse 2s ease-in-out;
  border: 2px solid #10b981;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

/* Update indicator */
.update-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Requirements container */
.requirements-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.requirements-input {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.requirements-input .form-input {
  flex: 1;
}

.btn-add {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-add:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.requirements-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2rem;
}

.requirement-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--text);
}

.requirement-tag .remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.requirement-tag .remove-btn:hover {
  background: var(--danger);
  color: white;
}

.update-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utilities */
.hidden{ display:none !important; }
.visually-hidden{ position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
.hr{ height:1px; background: var(--border); margin:.6rem 0; }

/* Mobile improvements */
@media (max-width: 768px) {
  /* Улучшенное центрирование спиннера на мобильных */
  .loading-overlay {
    padding: 40px 20px;
    /* Дополнительная защита от проблем с viewport */
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height для мобильных */
  }
  
  .loading-spinner {
    width: 50px;
    height: 50px;
    border-width: 3px;
  }
  
  .loading-text {
    font-size: 0.9rem;
    margin-top: 1.25rem;
  }
  
  .page-hero {
    padding: 2rem 0 1rem;
    min-height: 50vh;
  }
  
  .page-hero h1 { 
    font-size: 1.8rem; 
    margin-bottom: 1rem;
  }
  
  .page-hero p { 
    font-size: 1rem; 
    margin-bottom: 1.5rem;
  }
  
  .sidebar .stats {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .sidebar .stats .stat:nth-child(2) .value,
  .sidebar .stats .stat:nth-child(2) .label {
    transform: none;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .btn.large {
    width: 100%;
    padding: 1rem;
  }
  
  .hero-visual {
    height: 250px;
    margin-top: 1.5rem;
  }
  
  .floating-card {
    padding: 1rem;
    font-size: 0.9rem;
    width: 120px;
    height: 100px;
  }
  
  .card-1, .card-2, .card-3 {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 0.5rem;
  }
  
  .task-card { 
    padding: 1rem; 
    margin-bottom: 1rem;
  }
  
  .task-actions {
    opacity: 1;
    transform: translateY(0);
    margin-top: 0.8rem;
  }
  
  .btn-apply {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  .stats { 
    grid-template-columns: 1fr; 
    gap: 0.5rem; 
  }
  
  .controls { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 0.8rem;
  }
  
  .controls .input, .controls .select { 
    width: 100%; 
    padding: 0.8rem;
  }
  
  .menu { 
    flex-direction: column; 
    gap: 0.5rem; 
    width: 100%;
  }
  
  .brand .logo { 
    width: 36px; 
    height: 36px; 
  }
  
  .nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .main-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .sidebar {
    order: -1;
  }
  
  .stream {
    gap: 1rem;
  }
  
  .chip {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .task-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .task-meta .username {
    font-size: 0.8rem;
  }
  
  .task-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  /* Мобильная форма подписки - компактная версия */
  .footer {
    padding: 0.75rem 0 1.5rem;
  }

  .subscribe {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(109, 94, 252, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    max-width: 100%;
  }

  .subscribe::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(109,94,252,0.05) 0%, rgba(64,201,255,0.05) 100%);
    pointer-events: none;
  }

  .subscribe .input {
    flex: 1;
    min-width: 120px;
    padding: 0.25rem 0.5rem;
    height: 1.75rem;
    font-size: 16px; /* Предотвращает зум на iOS */
    border-radius: 4px;
    border: 1px solid rgba(109, 94, 252, 0.4);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }

  .subscribe .input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.2);
    background: white;
  }

  .subscribe .input::placeholder {
    color: var(--muted);
    font-size: 16px;
  }

  .subscribe .btn {
    padding: 0.25rem 0.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    min-width: 70px;
    background: var(--accent);
    color: white;
    border: none;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(109, 94, 252, 0.35);
  }

  .subscribe .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 94, 252, 0.45);
  }

  .subscribe .btn:active {
    transform: translateY(-1px);
  }


  .footer-links {
    flex-direction: row; /* arrange in a row on small screens */
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 0 0.5rem;
  }

  .footer-links a {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .footer-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
  }

  .footer-links a:hover::before {
    left: 100%;
  }

  .footer-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(109, 94, 252, 0.2);
  }
}

/* Touch improvements */
@media (hover: none) {
  .task-card:hover { transform: none; }
  .btn:hover { transform: none; }
  .chip:hover { transform: none; }
  .stat:hover { transform: none; }
  .sidebar .panel:hover { transform: none; }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(15, 23, 42, 0.2);
    --shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
}

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

/* ===============================
   Modern Auth Forms
================================== */

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  position: relative;
  padding: 2rem 0;
}

.auth-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(20px);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  animation: pulse 2s infinite;
}

.auth-icon svg {
  width: 32px;
  height: 32px;
}

.auth-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-header p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem; /* Увеличиваем отступ между группами полей */
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem; /* Увеличиваем отступ между заголовком и полем */
  font-size: 0.9rem;
}

.form-label svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.1);
  transform: none;
}

.form-input::placeholder {
  color: var(--muted);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -0.5rem 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.auth-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 2rem auto 0; /* Центрируем и добавляем отступы */
  max-width: 300px; /* Ограничиваем ширину */
}

.auth-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.3);
}

.auth-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.auth-btn:hover svg {
  transform: translateX(4px);
}

.auth-divider {
  text-align: center;
  position: relative;
  margin: 1rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  background: var(--card);
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.social-btn:hover {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary), transparent 95%);
  transform: translateY(-1px);
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

.social-btn.google svg {
  color: #4285f4;
}

.social-btn.github svg {
  color: #333;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-footer p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.auth-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.circle-1 {
  width: 120px;
  height: 120px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.circle-2 {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.circle-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

/* ===============================
   Modern Post Form
================================== */

.post-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
  position: relative;
  padding: 2rem 0;
}

.post-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
}

.post-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: white;
  animation: pulse 2s infinite;
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.3);
}

.post-icon svg {
  width: 40px;
  height: 40px;
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.post-header p {
  color: var(--muted);
  font-size: 1.2rem;
  margin: 0;
}

.post-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 800px;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(20px);
}

.post-form {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.form-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.5rem;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.form-label svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.form-input, .form-select {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: none;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.1);
  transform: none;
}

.form-input::placeholder {
  color: var(--muted);
}

.form-textarea {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: none;
  min-height: 150px;
  resize: vertical;
  font-family: inherit;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.1);
  transform: none;
}

.textarea-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.char-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.post-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 1.25rem 3rem;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  min-width: 200px;
}

.post-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(109, 94, 252, 0.4);
}

.post-btn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.post-btn:hover svg {
  transform: translateX(6px);
}

.demo-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  background: color-mix(in oklab, var(--card), transparent 20%);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.demo-notice svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

.post-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.decoration-shape {
  position: absolute;
  background: var(--accent);
  opacity: 0.08;
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 150px;
  height: 150px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  top: 15%;
  left: 5%;
  animation-delay: 0s;
}

.shape-2 {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  top: 60%;
  right: 10%;
  animation-delay: 3s;
}

.shape-3 {
  width: 80px;
  height: 80px;
  border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
  bottom: 20%;
  left: 15%;
  animation-delay: 6s;
}

/* Mobile responsiveness for post form */
@media (max-width: 768px) {
  .post-card {
    padding: 2rem;
    margin: 0 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .post-header h1 {
    font-size: 2rem;
  }
  
  .post-header p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.1rem;
  }
  
  .form-section {
    padding-bottom: 1.5rem;
  }
  
  .post-form {
    gap: 2rem;
  }
}

/* Loading */
.loading{
  display:grid; place-items:center; color:var(--muted); padding: .8rem; font-size:.9rem;
}

/* ===============================
   Legal & Info Pages
================================== */

.legal-container, .about-container, .contact-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.legal-header, .about-header, .contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.legal-icon, .about-icon, .contact-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: white;
  animation: pulse 2s infinite;
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.3);
}

.legal-icon svg, .about-icon svg, .contact-icon svg {
  width: 40px;
  height: 40px;
}

.legal-header h1, .about-header h1, .contact-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-subtitle, .about-subtitle, .contact-subtitle {
  color: var(--muted);
  font-size: 1.2rem;
  margin: 0;
}

.legal-content, .about-content {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-hover);
  backdrop-filter: blur(20px);
}

.legal-section, .about-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child, .about-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2, .about-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
}

.legal-section p, .about-section p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.legal-section ul, .about-section ul {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.legal-section li, .about-section li {
  margin-bottom: 0.5rem;
}

/* About page specific styles */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.benefit-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.benefit-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.benefit-icon svg {
  width: 24px;
  height: 24px;
}

.benefit-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.benefit-item p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  padding: 0 0.35rem;
  box-sizing: border-box;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.team-member {
  text-align: center;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.team-member:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.member-avatar {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.team-member h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.team-member p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Contact page specific styles */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.contact-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.contact-method {
  text-align: center;
}

.method-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
}

.method-icon svg {
  width: 32px;
  height: 32px;
}

.contact-method h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.contact-method p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.contact-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.contact-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin: 3rem 0;
}

.contact-info-section {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact-method {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.contact-method:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.method-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.method-content p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.response-time {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.office-info {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.office-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.office-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.office-item svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.contact-form-section {
  margin: 3rem 0;
}

.contact-form-container {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-hover);
  backdrop-filter: blur(20px);
}

.contact-form-container h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  text-align: center;
}

.contact-form-container p {
  color: var(--muted);
  text-align: center;
  margin: 0 0 2rem;
}

.faq-section {
  margin: 4rem 0;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.faq-item {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.faq-item h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem;
}

.faq-item p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.contact-form-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-hover);
  backdrop-filter: blur(20px);
}

.contact-form-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
  text-align: center;
}

.contact-form-card p {
  color: var(--muted);
  text-align: center;
  margin: 0 0 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.contact-form .form-group {
  position: relative;
  margin-bottom: 0;
}

.contact-form .form-label {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.contact-form .form-input,
.contact-form .form-select,
.contact-form .form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(109, 94, 252, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.contact-form .form-input:focus,
.contact-form .form-select:focus,
.contact-form .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.15), 0 4px 12px rgba(109, 94, 252, 0.1);
  background: white;
  transform: translateY(-2px);
}

.contact-form .form-input:hover,
.contact-form .form-select:hover,
.contact-form .form-textarea:hover {
  border-color: rgba(109, 94, 252, 0.3);
  box-shadow: 0 2px 12px rgba(109, 94, 252, 0.08);
}

.contact-form .form-input::placeholder,
.contact-form .form-select::placeholder,
.contact-form .form-textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.contact-form .form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.contact-form .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  margin-top: 1rem;
  line-height: 1.4;
}

.contact-form .checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.contact-form .checkbox-label input[type="checkbox"]:focus {
  outline: 2px solid rgba(109, 94, 252, 0.3);
  outline-offset: 2px;
}

.contact-submit-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  min-width: 200px;
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.3);
  position: relative;
  overflow: hidden;
}

.contact-submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(109, 94, 252, 0.4);
}

.contact-submit-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 6px 20px rgba(109, 94, 252, 0.3);
}

.contact-submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.3);
}

.contact-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(109, 94, 252, 0.2);
}

.contact-submit-btn svg {
  width: 20px;
  height: 20px;
}

.office-info {
  margin: 3rem 0;
  text-align: center;
}

.office-info h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2rem;
}

.office-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.office-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-align: left;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.office-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.office-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.office-icon svg {
  width: 24px;
  height: 24px;
}

.office-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.office-item p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}

/* ===============================
   Mobile Responsiveness
================================== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .main-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .sidebar {
    order: -1;
  }
  
  .hero-number {
    /* Упрощенный стиль для планшетов - без градиента */
    background: none !important;
    color: #6d5efc !important;
    -webkit-text-fill-color: #6d5efc !important;
  }
  
  .sidebar .stats {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .sidebar .stats .stat:nth-child(2) .value,
  .sidebar .stats .stat:nth-child(2) .label {
    transform: none;
  }
  
  .brand .name {
    display: none; /* Скрываем название на всех мобильных устройствах */
  }
}

/* Tablets */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  /* Header */
  .nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  
  .menu a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Hero section */
  .page-hero {
    padding: 3rem 0;
    text-align: center;
  }
  
  .page-hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .page-hero p {
    font-size: 1.1rem;
    margin: 1rem 0 2rem;
  }
  
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
  }
  
  .hero-stat {
    min-width: auto;
    width: 100%;
  }
  
  .hero-number {
    /* Упрощенный стиль для мобильных - без градиента */
    background: none !important;
    color: #6d5efc !important;
    -webkit-text-fill-color: #6d5efc !important;
  }
  
  .sidebar .stats {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .sidebar .stats .stat:nth-child(2) .value,
  .sidebar .stats .stat:nth-child(2) .label {
    transform: none;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  /* Stats - увеличенные размеры для мобильных */
  .stat .value {
    font-size: 1.8rem;
  }
  
  .btn.large {
    width: 100%;
    max-width: 300px;
  }
  
  /* Floating cards */
  .hero-visual {
    display: none; /* Hide on mobile for better performance */
  }
  
  /* Task cards */
  .task-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .task-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .task-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-apply {
    width: 100%;
    justify-content: center;
  }
  
  /* Stats */
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat {
    padding: 1rem;
    text-align: center;
  }
  
  /* Controls */
  .controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filters {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  /* Legal pages */
  .legal-content, .about-content, .contact-form-card {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  .legal-header h1, .about-header h1, .contact-header h1 {
    font-size: 2rem;
  }
  
  .services-grid, .benefits-grid, .stats-grid, .team-grid, .contact-grid, .contact-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }

  .contact-form-container {
    padding: 2rem;
  }

  .contact-form {
    gap: 1.5rem;
  }

  .contact-form .form-input,
  .contact-form .form-select,
  .contact-form .form-textarea {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .contact-submit-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    min-width: 180px;
  }
  
  .stats-grid {
    padding: 0 1rem;
  }
  
  .stat-item {
    padding: 2rem 1.5rem;
    text-align: center;
  }
  
  .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
  }
  
  .stat-label {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 500;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .office-details {
    grid-template-columns: 1fr;
  }
  
  .office-item {
    flex-direction: column;
    text-align: center;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  /* Дополнительные улучшения для маленьких экранов */
  .loading-overlay {
    padding: 30px 15px;
    /* Используем transform для абсолютного центрирования */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .loading-spinner {
    width: 45px;
    height: 45px;
    border-width: 2.5px;
  }
  
  .loading-text {
    font-size: 0.85rem;
    margin-top: 1rem;
    max-width: 200px;
    word-wrap: break-word;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  /* Header */
  .brand {
    gap: 0.5rem;
  }
  
  .brand .name {
    display: none; /* Скрываем текст */
  }
  
  .brand .logo {
    display: flex; /* Показываем иконку */
  }
  
  .brand .logo img {
    width: 36px !important;
    height: 36px !important;
  }
  
  .brand .logo svg {
    width: 16px;
    height: 16px;
  }
  
  .menu {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .menu a {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }
  
  /* Hero section */
  .page-hero {
    padding: 2rem 0;
  }
  
  .page-hero h1 {
    font-size: 2rem;
  }
  
  .page-hero p {
    font-size: 1rem;
  }
  
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .hero-stat {
    padding: 1rem;
    min-width: auto;
    width: 100%;
  }
  
  .hero-number {
    font-size: 1.5rem;
    /* Упрощенный стиль для мобильных - без градиента */
    background: none !important;
    color: #6d5efc !important;
    -webkit-text-fill-color: #6d5efc !important;
  }
  
  .hero-label {
    font-size: 0.8rem;
  }
  
  .sidebar .stats {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .sidebar .stats .stat:nth-child(2) .value,
  .sidebar .stats .stat:nth-child(2) .label {
    transform: none;
  }
  
  /* Stats - увеличенные размеры для маленьких экранов */
  .stat .value {
    font-size: 1.6rem;
  }
  
  /* Task cards */
  .task-card {
    padding: 1rem;
  }
  
  .task-card h3 {
    font-size: 1.1rem;
  }
  
  .task-card p {
    font-size: 0.9rem;
  }
  
  .task-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .task-meta .username {
    font-size: 0.8rem;
  }
  
  .task-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  /* Stats */
  .stats {
    grid-template-columns: 1fr;
  }
  
  .stat {
    padding: 0.75rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
    padding: 0 0.25rem;
    box-sizing: border-box;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  /* Forms */
  .auth-container, .post-container {
    padding: 1rem;
  }
  
  .auth-card, .post-card {
    padding: 1.5rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-input, .form-select, .form-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Legal pages */
  .legal-content, .about-content, .contact-form-card {
    padding: 1rem;
    margin: 0;
  }
  
  .legal-header h1, .about-header h1, .contact-header h1 {
    font-size: 1.8rem;
  }
  
  .legal-icon, .about-icon, .contact-icon {
    width: 60px;
    height: 60px;
  }
  
  .legal-icon svg, .about-icon svg, .contact-icon svg {
    width: 30px;
    height: 30px;
  }
  
  /* Footer - компактная версия для маленьких экранов */
  .footer {
    padding: 0.75rem 0 1.25rem;
  }

  .subscribe {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    margin: 0 0.125rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(109, 94, 252, 0.3);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    max-width: 100%;
  }

  .subscribe .footer-controls {
    margin-left: 0;
    margin-top: 0.5rem;
    align-self: center;
  }

  .subscribe::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(109,94,252,0.08) 0%, rgba(64,201,255,0.08) 100%);
    pointer-events: none;
  }

  .subscribe .input {
    width: 100%;
    padding: 0.5rem 1rem;
    height: 2.25rem;
    font-size: 16px; /* Предотвращает зум на iOS */
    border-radius: 8px;
    border: 1px solid rgba(109, 94, 252, 0.4);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  }

  .subscribe .input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(109, 94, 252, 0.25);
    background: white;
  }

  .subscribe .input::placeholder {
    font-size: 16px;
    color: var(--muted);
  }

  .subscribe .btn {
    width: 100%;
    padding: 0.5rem 1rem;
    height: 2.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(109, 94, 252, 0.4);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
  }

  .subscribe .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 94, 252, 0.5);
  }

  .subscribe .btn:active {
    transform: translateY(-1px);
  }

  /* Переключатель темы */
    .subscribe .footer-controls {
    margin-left: auto;
    margin-top: 0;
  }

  .subscribe .switch {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(109, 94, 252, 0.2);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
  }

  .subscribe .switch:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
  }

  .subscribe .switch .track {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: rgba(109, 94, 252, 0.3);
  }

  .subscribe .switch .thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 0 0.25rem;
  }

  .footer-links a {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
  }

  .footer-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
  }
}

/* Very small screens */
@media (max-width: 320px) {
  /* Максимальная защита для очень маленьких экранов */
  .loading-overlay {
    padding: 20px 10px;
    /* Принудительное центрирование через transform */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 2px;
  }
  
  .loading-text {
    font-size: 0.8rem;
    margin-top: 0.875rem;
    max-width: 180px;
  }
  
  .container {
    padding: 0 0.5rem;
  }
  
  .page-hero h1 {
    font-size: 1.8rem;
  }
  
  /* Stats - увеличенные размеры для очень маленьких экранов */
  .stat .value {
    font-size: 1.4rem;
  }
  
  .task-card {
    padding: 0.75rem;
  }
  
  .auth-card, .post-card {
    padding: 1rem;
  }
  
  .legal-content, .about-content, .contact-form-card, .contact-form-container {
    padding: 0.75rem;
  }

  .contact-form {
    gap: 1.25rem;
  }

  .contact-form .form-input,
  .contact-form .form-select,
  .contact-form .form-textarea {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .contact-submit-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    min-width: 160px;
  }

  .contact-form .checkbox-label {
    font-size: 0.9rem;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .office-details {
    gap: 1rem;
  }
  
  /* Компактная версия для очень маленьких экранов */
  .subscribe {
    padding: 0.75rem 0.5rem;
    margin: 0 0.0625rem 0.75rem;
    border-radius: 8px;
    gap: 0.75rem;
  }

  .subscribe .footer-controls {
    margin-top: 0.75rem;
    margin-left: 0;
  }

  .subscribe .input {
    padding: 0.375rem 0.75rem;
    height: 2rem;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid rgba(109, 94, 252, 0.5);
  }

  .subscribe .btn {
    padding: 0.375rem 0.75rem;
    height: 2rem;
    font-size: 0.9rem;
    border-radius: 6px;
    font-weight: 600;
  }

  .subscribe .switch {
    padding: 0.5rem;
    margin-top: 0.5rem;
  }

  .subscribe .switch .track {
    width: 36px;
    height: 20px;
    border-radius: 10px;
  }

  .subscribe .switch .thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
  }

  .footer-links a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }
}

/* ===============================
   Mobile Menu (Hamburger)
================================== */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

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

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

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

/* Mobile menu styles */
@media (max-width: 768px) {
  .nav,
  .header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }
  
  /* Логотип - слева */
  .brand,
  .header-content .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    order: 1;
    flex-shrink: 0;
    margin-right: auto;
  }
  
  /* Показываем только иконку, скрываем текст на мобильных */
  .brand .logo,
  .header-content .brand .logo {
    display: flex;
  }
  
  .brand .logo img,
  .header-content .brand .logo img {
    width: 36px !important;
    height: 36px !important;
  }
  
  .brand .name,
  .brand-text,
  .header-content .brand .name,
  .header-content .brand-text {
    display: none;
  }
  
  /* User indicator / Login button - в центре справа */
  .header-actions,
  .header-content .header-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    order: 2;
    flex-shrink: 0;
  }
  
  /* Скрываем кнопку Post a Task на мобильных (будет показана только на главной через JS) */
  .header-actions .btn.primary {
    display: none !important;
  }
  
  /* Кнопка Sign In */
  .header-actions .btn.ghost {
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    height: 38px;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  
  /* User indicator - очень компактный */
  .header-actions .user-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  
  /* Скрываем текстовую информацию пользователя */
  .header-actions .user-info {
    display: none !important;
  }
  
  /* Avatar компактный */
  .header-actions .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    cursor: pointer;
  }
  
  /* Menu toggle кнопка - более компактная */
  .header-actions .menu-toggle {
    padding: 0.35rem;
  }
  
  /* Бургер-меню - справа с отступом от края */
  .mobile-menu-toggle,
  .header-content .mobile-menu-toggle {
    display: flex;
    order: 3;
    flex-shrink: 0;
    margin-left: 0.75rem;
    padding-right: 0.25rem;
  }
  
  /* Убедимся что на profile странице menu не блокирует */
  .header-content .menu:not(.active) {
    display: flex;
    left: -100%;
  }
  
  .menu,
  .header-content .menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--card);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.3s ease;
    z-index: 1000;
    padding: 2rem;
    display: flex;
  }
  
  .menu.active {
    left: 0;
  }
  
  .menu a {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    width: 100%;
    max-width: 300px;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
  }
  
  .menu a:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
  }
  
  .menu a.btn {
    background: var(--accent);
    color: white;
    border: none;
  }
  
  .menu a.btn:hover {
    background: var(--accent-hover);
  }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
  .btn, .btn-apply, .chip, .task-card {
    transform: none !important;
  }
  
  .btn:hover, .btn-apply:hover, .chip:hover, .task-card:hover {
    transform: none !important;
  }
  
  /* Larger touch targets */
  .btn, .btn-apply {
    min-height: 44px;
    min-width: 44px;
  }
  
  .chip {
    min-height: 32px;
    padding: 0.5rem 1rem;
  }
  
  .menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .page-hero {
    padding: 1.5rem 0;
  }
  
  .page-hero h1 {
    font-size: 2rem;
  }
  
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
  
  .hero-stat {
    padding: 0.5rem;
    min-width: auto;
    width: 100%;
  }
  
  .hero-number {
    font-size: 1.2rem;
    /* Упрощенный стиль для мобильных - без градиента */
    background: none !important;
    color: #6d5efc !important;
    -webkit-text-fill-color: #6d5efc !important;
  }
  
  .hero-label {
    font-size: 0.7rem;
  }
  
  .sidebar .stats {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .sidebar .stats .stat:nth-child(2) .value,
  .sidebar .stats .stat:nth-child(2) .label {
    transform: none;
  }
}

/* ===============================
   Subscription Confirmation Modal
================================== */

.subscription-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.subscription-modal.show {
  display: flex;
}

.subscription-modal-content {
  background: var(--gradient-card);
  border-radius: 24px;
  padding: 3rem 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

.subscription-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109,94,252,0.05) 0%, rgba(64,201,255,0.05) 100%);
  pointer-events: none;
}

.subscription-modal-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: white;
  animation: pulse 2s infinite;
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.3);
  position: relative;
  z-index: 1;
}

.subscription-modal-icon svg {
  width: 40px;
  height: 40px;
}

.subscription-modal h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.subscription-modal p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 2rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.subscription-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.subscription-confirm-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 140px;
}

.subscription-confirm-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(109, 94, 252, 0.3);
}

.subscription-cancel-btn {
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.subscription-cancel-btn:hover {
  background: var(--border);
  transform: translateY(-2px);
}

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

/* Mobile styles for subscription modal */
@media (max-width: 768px) {
  .subscription-modal {
    padding: 0.5rem;
  }
  
  .subscription-modal-content {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }
  
  .subscription-modal h2 {
    font-size: 1.5rem;
  }
  
  .subscription-modal p {
    font-size: 1rem;
  }
  
  .subscription-modal-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .subscription-confirm-btn,
  .subscription-cancel-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .subscription-modal-content {
    padding: 1.5rem 1rem;
  }
  
  .subscription-modal-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
  }
  
  .subscription-modal-icon svg {
    width: 30px;
    height: 30px;
  }
  
  .subscription-modal h2 {
    font-size: 1.3rem;
  }
  
  .subscription-modal p {
    font-size: 0.95rem;
  }
}

/* ===============================
   User Profile & Authentication Styles
================================== */

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 2;
  text-align: center;
}

/* User Indicator in Header */
.user-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.user-avatar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.user-avatar:hover::before {
  transform: translateX(100%);
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--glow);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.2;
}

.user-email {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.2;
}

.user-menu {
  position: relative;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  color: var(--text);
  background: var(--border);
}

.menu-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.user-menu.active .menu-toggle svg {
  transform: rotate(180deg);
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-hover);
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-menu.active .menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--border);
  color: var(--primary);
}

.menu-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.logout-btn {
  color: var(--danger) !important;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--danger) !important;
}

/* Profile Page Styles */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.profile-actions { display: none; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--gradient-card);
  border-radius: 1.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.05) 0%, rgba(64, 201, 255, 0.05) 100%);
  pointer-events: none;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.profile-info {
  flex: 1;
  position: relative;
  z-index: 1;
}

.profile-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-email {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
}

.profile-join-date {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.profile-actions {
  position: relative;
  z-index: 1;
}

.profile-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px; /* left flexible, right fixed */
  align-items: start;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .profile-content {
    grid-template-columns: 1fr; /* stack on smaller screens */
  }
}



.profile-stats {
  grid-column: 1 / -1; /* span full width to avoid stretching */
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.profile-stats .stat-card {
  flex: 1 1 180px; /* allow grow but set min width */
  max-width: 220px;
  height: auto;
}



.profile-stats .stat-card {
  align-self: start; /* ensure individual cards fit content */
}


.stat-card {
  background: var(--gradient-card);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.05) 0%, rgba(64, 201, 255, 0.05) 100%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 0.75rem;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

.stat-info {
  position: relative;
  z-index: 1;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.profile-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-section {
  background: var(--gradient-card);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.profile-section::before {
  
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.03) 0%, rgba(64, 201, 255, 0.03) 100%);
  pointer-events: none;
}

.profile-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.5rem 0;
  position: relative;
  z-index: 1;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.activity-item:hover {
  background: var(--card);
  box-shadow: var(--shadow);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
}

.activity-description {
  color: var(--muted);
  margin: 0 0 0.25rem 0;
  font-size: 0.85rem;
}

.activity-time {
  color: var(--muted);
  font-size: 0.75rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Save Settings button size tweak */
.settings-form .btn.primary {
  align-self: flex-start;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  border-radius: 0.75rem;
  gap: 0.4rem;
}
.settings-form .btn.primary svg { width: 18px; height: 18px; }


/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
  /* Improve touch targets */
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px; /* iOS recommended minimum touch target */
  }
  
  .post-btn {
    min-height: 48px; /* Android recommended minimum touch target */
  }
  
  .btn {
    min-height: 44px;
  }
  
  /* Improve form interaction */
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    transform: none; /* Prevent zoom on iOS */
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Mobile Responsiveness for Post Page */
@media (max-width: 768px) {
  .post-container {
    padding: 1rem;
    min-height: auto;
  }
  
  .post-header {
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .post-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
  }
  
  .post-icon svg {
    width: 30px;
    height: 30px;
  }
  
  .post-header h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .post-header p {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .post-card {
    padding: 1.5rem;
    margin: 0;
    border-radius: 16px;
    width: 100%;
    max-width: none;
  }
  
  .post-form {
    gap: 1.5rem;
  }
  
  .form-section {
    gap: 1rem;
  }
  
  .section-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-group {
    width: 100%;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    border-width: 2px; /* Thicker borders for better visibility */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.1);
    outline: none;
  }
  
  .form-textarea {
    min-height: 120px;
    resize: vertical;
  }
  
  .textarea-footer {
    margin-top: 0.5rem;
  }
  
  .char-count {
    font-size: 0.8rem;
  }
  
  .post-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 12px;
    justify-content: center;
  }
  
  .post-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .post-decoration {
    display: none;
  }
  
  /* Mobile requirements */
  .requirements-input {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .btn-add {
    width: 100%;
    justify-content: center;
  }
  
  .requirements-list {
    min-height: auto;
  }
  
  /* Mobile navigation improvements */
  .nav {
    padding: 0.75rem 0;
  }
  
  .brand .name {
    display: none; /* Скрываем текст названия на мобильных */
  }
  
  /* Кнопка Post a Task показывается только на главной странице через JS */
  .header-actions .btn.primary {
    display: none !important;
  }
  
  /* Если на главной - показываем компактно */
  body.home-page .header-actions .btn.primary {
    display: inline-flex !important;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
    height: 38px;
    line-height: 1.2;
    margin-left: 0.5rem;
  }
  
  /* Mobile footer improvements */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer .container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .subscribe {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .footer-controls {
    order: -1;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }
  
  .footer-links a {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .post-container {
    padding: 0.5rem;
  }
  
  .post-header {
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .post-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
  }
  
  .post-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .post-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  
  .post-header p {
    font-size: 0.9rem;
  }
  
  .post-card {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .post-form {
    gap: 1.25rem;
  }
  
  .form-section {
    gap: 0.75rem;
  }
  
  .section-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .section-title svg {
    width: 16px;
    height: 16px;
  }
  
  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }
  
  .form-label svg {
    width: 14px;
    height: 14px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.65rem;
    font-size: 0.95rem;
    border-radius: 6px;
    border-width: 2px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.1);
    outline: none;
  }
  
  .form-textarea {
    min-height: 100px;
  }
  
  .post-btn {
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 10px;
  }
  
  .post-btn svg {
    width: 18px;
    height: 18px;
  }
  
  /* Enhanced mobile navigation for small screens */
  .brand .name {
    display: none; /* Скрываем текст на маленьких экранах */
  }
  
  .header-actions .btn {
    padding: 0 0.7rem;
    font-size: 0.82rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 35px;
    min-height: 35px;
    height: 35px;
    min-width: 68px;
    width: auto;
    font-weight: 600;
    vertical-align: middle;
    text-align: center;
  }
  
  /* Enhanced mobile footer for small screens */
  .footer {
    padding: 1.5rem 0 1rem;
  }
  
  .subscribe {
    max-width: 100%;
  }
  
  .subscribe .input {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .subscribe .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .footer-links {
    gap: 0.5rem;
  }
  
  .footer-links a {
    font-size: 0.85rem;
    padding: 0.25rem 0;
  }
}

@media (max-width: 320px) {
  .post-container {
    padding: 0.25rem;
  }
  
  .post-header {
    padding: 0 0.25rem;
  }
  
  .post-header h1 {
    font-size: 1.5rem;
  }
  
  .post-header p {
    font-size: 0.85rem;
  }
  
  .post-card {
    padding: 0.75rem;
    border-radius: 8px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.6rem;
    font-size: 0.9rem;
    border-width: 2px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.1);
    outline: none;
  }
  
  .post-btn {
    padding: 0.8rem 1.25rem;
    font-size: 0.9rem;
  }
  
  /* Ultra-small screen optimizations */
  .brand .name {
    display: none; /* Скрываем текст на ультра-маленьких экранах */
  }
  
  .header-actions .btn {
    padding: 0 0.6rem;
    font-size: 0.75rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 32px;
    min-height: 32px;
    height: 32px;
    min-width: 62px;
    width: auto;
    font-weight: 600;
    vertical-align: middle;
    text-align: center;
  }
  
  .footer {
    padding: 1rem 0 0.75rem;
  }
  
  .subscribe .input {
    padding: 0.65rem;
    font-size: 0.85rem;
  }
  
  .subscribe .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .footer-links a {
    font-size: 0.8rem;
  }
}

/* Mobile Responsiveness for Profile */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .profile-avatar {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }
  
  .profile-name {
    font-size: 2rem;
  }
  
  .profile-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  /* User indicator на планшетах */
  .user-indicator {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  
  .user-info {
    display: flex !important;
    flex-direction: column;
  }
  
  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    flex-shrink: 0;
  }
  
  .user-menu {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .profile-container {
    padding: 1rem 0.5rem;
  }
  
  .profile-header {
    padding: 1.5rem;
  }
  
  .profile-stats {
    grid-template-columns: 1fr;
  }
  
  .profile-section {
    padding: 1.5rem;
  }
  
  /* Extra compact header for very small screens */
  .brand .logo {
    display: flex; /* Показываем иконку */
  }
  
  .brand .logo img {
    width: 32px !important;
    height: 32px !important;
  }
  
  .brand .name {
    display: none; /* Скрываем текст */
  }
  
  .header-actions {
    gap: 0.2rem; /* Еще меньше gap */
  }
  
  .header-actions .btn.ghost {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    height: 36px;
  }
  
  .header-actions .user-indicator {
    gap: 0.25rem; /* Минимальный gap */
  }
  
  .header-actions .user-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
  
  .header-actions .menu-toggle {
    padding: 0.3rem;
  }
  
  /* На главной странице кнопка компактнее */
  body.home-page .header-actions .btn.primary {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    height: 36px;
  }
  
  .mobile-menu-toggle,
  .header-content .mobile-menu-toggle {
    margin-left: 0.6rem;
    padding-right: 0.25rem;
  }
  
  /* Увеличиваем отступы в nav для дыхания */
  .nav,
  .header-content {
    padding: 0.75rem 0.5rem;
  }
}
/* Cookie consent banner */
.cookie-banner{position:fixed;left:16px;right:16px;bottom:16px;z-index:1000;padding:12px 16px;border-radius:12px;border:1px solid rgba(109,94,252,.2);background:var(--card-bg,#fff);color:var(--text,#1a1a1a);box-shadow:0 12px 32px rgba(0,0,0,.12);display:flex;align-items:center;justify-content:space-between;gap:12px}
.cookie-banner .cookie-text{line-height:1.4}
.cookie-banner .cookie-actions{display:flex;align-items:center;gap:12px}
.cookie-banner .btn{padding:8px 14px;border-radius:8px;border:none;background:linear-gradient(90deg,#6d5efc,#4db6ff);color:#fff;cursor:pointer}
.cookie-banner .link{color:#6d5efc;text-decoration:underline}
@media (max-width: 640px){.cookie-banner{left:8px;right:8px;bottom:8px;padding:10px 12px;flex-direction:column;align-items:flex-start}}

/* Bouncing balls loader animation */
.bouncing-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.bouncing-loader > div {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: white;
  animation: bouncing-loader 0.6s infinite alternate;
}

.bouncing-loader > div:nth-child(2) {
  animation-delay: 0.2s;
}

.bouncing-loader > div:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bouncing-loader {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0.3;
    transform: translateY(-12px);
  }
}

/* Password validator - Google style */
.password-validator {
  padding: 1rem;
  border-radius: 8px;
  background: var(--card-bg, #f8f9fa);
  border: 1px solid var(--border, #e0e0e0);
  transition: all 0.3s ease;
}

.password-strength-bar {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  background: #e0e0e0;
}

.password-strength-fill.weak {
  width: 33.33%;
  background: #ea4335;
}

.password-strength-fill.fair {
  width: 66.66%;
  background: #fbbc04;
}

.password-strength-fill.good {
  width: 100%;
  background: #34a853;
}

.password-strength-text {
  color: #5f6368;
  transition: color 0.3s ease;
}

.password-strength-text.weak {
  color: #ea4335;
}

.password-strength-text.fair {
  color: #fbbc04;
}

.password-strength-text.good {
  color: #34a853;
}

.validator-item {
  display: flex;
  align-items: flex-start;
  color: #5f6368;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.validator-item:last-child {
  margin-bottom: 0;
}

.validator-item svg {
  opacity: 0.2;
  transition: all 0.3s ease;
}

.validator-item.valid {
  color: #1a73e8;
}

.validator-item.valid svg {
  opacity: 1;
  color: #1a73e8;
}

