/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #F0F7FF 0%, #E6F2FF 100%);
    color: #333;
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

.screen {
    display: none !important;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    visibility: hidden;
    opacity: 0;
}

.screen.active {
    display: flex !important;
    flex-direction: column;
    z-index: 10;
    visibility: visible;
    opacity: 1;
}

/* Splash Screen */
.splash-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
}

.robot-image {
    width: 240px;
    height: auto;
    animation: float 6s ease-in-out infinite;
    margin: 0 0 30px 0;
    filter: drop-shadow(0 10px 20px rgba(74, 144, 194, 0.15));
}

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

.splash-title {
    margin-top: 0;
    margin-bottom: 0;
}

.splash-title h1 {
    font-size: 56px;
    font-weight: 300;
    color: #4A90E2;
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.splash-title p {
    font-size: 18px;
    color: #6BA3D6;
    font-weight: 400;
}

.splash-footer {
    position: absolute;
    bottom: 30px;
    width: 100%;
}

.splash-footer p {
    font-size: 12px;
    color: #A8C8E8;
    opacity: 0.8;
}

/* Security Screen */
.security-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 30px;
}

.lock-container {
    width: 200px;
    height: 200px;
    background: #edf1fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 40px;
    box-shadow: 0 15px 35px rgba(74, 144, 194, 0.15);
}

.lock-image {
    width: 100px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(74, 144, 194, 0.2));
}

.security-title h2 {
    font-size: 32px;
    color: #094ca2;
    margin-bottom: 25px;
    font-weight: 300;
    line-height: 1.3;
}

.security-title p {
    font-size: 16px;
    color: #00020a;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto 50px;
    font-weight: 300;
}

.continue-btn {
    background: linear-gradient(145deg, #0256b9 0%, #137af3 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 200;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(2, 86, 185, 0.3);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(2, 86, 185, 0.4);
    background: linear-gradient(145deg, #137af3 0%, #0256b9 100%);
}

/* Main Screen */
.main-screen {
    padding: 20px;
    min-height: 100vh;
    overflow: hidden;
}

.main-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Calendar Section */
.calendar-section {
    margin-bottom: 30px;
    padding-top: 10px;
    min-height: 80px;
}

.month-label {
    font-size: 16px;
    color: #000;
    margin-bottom: 15px;
    margin-left: 4px;
    font-weight: 400;
}

.calendar-container {
    position: relative;
    padding-bottom: 20px;
}

.calendar-days {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    max-width: 100%;
    overflow-x: hidden;
}

.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    flex: 1;
    min-width: 0;
}

.day-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #E8F0FE;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.calendar-day.active .day-circle {
    background: #FFFFFF;
    border: 2px solid #4A90E2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.day-number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1;
    text-align: center;
}

.calendar-day.active .day-number {
    color: #4A90E2;
}

10px;
    line-height: 1;
    background: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 2;
}

.calendar-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    margin-top: 8px;
    height: 6px;
    position: relative;
}

.day-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4A90E2;
    position: relative;
    flex: 1;
    margin: 0 auto;
    left: 19px;
}

.day-indicator-placeholder {
    width: 6px;
    height: 6px;
    position: relative;
    flex: 1;
    margin: 0 auto;
}

/* Greeting Section */
12px;
}

28px;
    color: #4A90E2;
    margin-bottom: 8px;
    font-weight: 400;
}

14px;
    color: #666;
    font-weight: 400;
}

/* Mood and Chart Section Combined */
.mood-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 0 0 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mood-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mood-header span {
    font-size: 16px;
    color: #1976D2;
    font-weight: 500;
}

.mood-profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.mood-selector {
    background: #4A90E2;
    border-radius: 20px;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 91, 255, 0.25);
}

40px;
    height: 44px;
    font-size: 22px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

40px;
    margin: 0 auto;
    display: block;
}

.chart-dates {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.3px;
    margin-top: 8px;
    padding: 0 8px;
}

.chart-dates span {
    padding: 0 2px;
}

/* Bottom Navigation */
8px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    z-index: 100;
    max-width: 320px;
    margin: 0 auto;
}

6px 4px;
    color: #A0AEC0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    position: relative;
}

.nav-item.active {
    color: #4A90E2;
    background: rgba(74, 144, 226, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(160, 174, 192, 0.08);
    margin: 0 auto;
    transition: all 0.3s ease;
}

.nav-item.active 32px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.calendar-day.active {
    border-color: #4A90E2;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
}

.calendar-day.completed::after {
    content: "👑";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
}

.calendar-day.locked::after {
    content: "+";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E2E8F0;
    color: #A0AEC0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Daily Plan */
.daily-plan {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin: 0 20px 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.daily-plan h3 {
    font-size: 20px;
    color: #2C5282;
    margin-bottom: 15px;
}

/* Старое правило для Daily Plan Screen - НЕ применяется к Practices Screen */
#daily-plan-screen .plan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0px; /* Убрали отступ снизу */
}

.plan-info {
    display: flex;
    align-items: center;
}

.plan-info span {
    font-size: 16px;
    color: #2C5282;
    margin-right: 15px;
}

.plan-tags {
    display: flex;
    gap: 10px;
}

.tag {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: #1976D2;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    border: 1px solid #90CAF9;
}

.play-btn {
    background: linear-gradient(145deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.play-btn:hover {
    transform: scale(1.1);
}

/* Chat Screen */
.chat-screen {
    background: #e3f3fd;
}

.chat-header {
    background: transparent;
    padding: 15px 20px;
    display: flex;
    align-items: center;
}

.back-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #4A90E2;
    margin-right: 15px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.message {
    margin-bottom: 15px;
    max-width: 80%;
}

.message.user {
    margin-left: auto;
}

.message.bot {
    margin-right: auto;
}

.message-bubble {
    padding: 0;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.4;
    position: relative;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #4A90E2 0%, #6BA3D6 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    padding: 12px 16px;
}

.message.bot .message-bubble,
.message.assistant .message-bubble {
    background: #F0F0F0;
    color: #2C3E50;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px 16px;
}

.message-bubble p {
    margin: 0;
    padding: 0;
}

/* Markdown styles in message bubbles */
.message-content.markdown {
    width: 100%;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.message-content.markdown p {
    margin: 0 0 8px 0;
}

.message-content.markdown p:last-child {
    margin-bottom: 0;
}

.message-content.markdown ul,
.message-content.markdown ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content.markdown li {
    margin: 4px 0;
}

.message-content.markdown code {
    background: rgba(74, 144, 226, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.message-content.markdown pre {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content.markdown pre code {
    background: none;
    padding: 0;
}

.message-content.markdown strong {
    font-weight: 600;
}

.message-content.markdown em {
    font-style: italic;
}

.message-content.markdown blockquote {
    border-left: 3px solid #4A90E2;
    padding-left: 12px;
    margin: 8px 0;
    color: #666;
}

/* Message footer with time and status */
.message-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    justify-content: flex-end;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
}

.message-status {
    font-size: 12px;
    line-height: 1;
}

/* Message actions (copy, like, dislike, edit) */
.message-actions {
    position: absolute;
    top: -8px;
    right: 12px;
    display: flex;
    gap: 4px;
    background: white;
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.message:hover .message-actions,
.message-bubble:hover .message-actions {
    opacity: 1;
    pointer-events: all;
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(74, 144, 226, 0.1);
}

.action-btn:active {
    transform: scale(0.95);
}

/* Voice Recorder */
.voice-record-start-btn {
    background: #4A90E2;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    transition: all 0.2s;
}

.voice-record-start-btn:hover {
    background: #357ABD;
    transform: scale(1.05);
}

.voice-record-start-btn:active {
    transform: scale(0.95);
}

.voice-recorder-active {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 24px;
}

.voice-cancel-btn {
    background: #ff4444;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s;
}

.voice-cancel-btn:hover {
    background: #cc0000;
}

.voice-recording-indicator {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-pulse {
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

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

.voice-timer {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #4A90E2;
}

.voice-stop-btn {
    background: #4A90E2;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    transition: all 0.2s;
}

.voice-stop-btn:hover {
    background: #357ABD;
}

.voice-stop-btn:active {
    transform: scale(0.95);
}

.voice-recorder-error {
    padding: 12px;
    background: #ffebee;
    border-radius: 8px;
    text-align: center;
}

.voice-recorder-error p {
    color: #c62828;
    margin: 0 0 8px 0;
}

.voice-recorder-error button {
    background: #c62828;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
}

/* Chat Search */
.chat-search {
    position: relative;
}

.chat-search-toggle {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.chat-search-toggle:hover {
    background: rgba(74, 144, 226, 0.1);
}

.chat-search-panel {
    position: absolute;
    top: -400px;
    right: 0;
    width: 320px;
    max-width: 90vw;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.chat-search-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #E2E8F0;
}

.chat-search-input {
    flex: 1;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.chat-search-input:focus {
    border-color: #4A90E2;
}

.chat-search-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
}

.chat-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-search-empty {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.chat-search-result {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid #E2E8F0;
}

.chat-search-result:hover {
    background: rgba(74, 144, 226, 0.05);
    border-color: #4A90E2;
}

.search-result-role {
    font-size: 12px;
    font-weight: 600;
    color: #4A90E2;
    margin-bottom: 4px;
}

.search-result-content {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-result-content mark {
    background: #fffacd;
    padding: 2px 4px;
    border-radius: 3px;
}

.search-result-time {
    font-size: 11px;
    color: #999;
}

.chat-input {
    background: white;
    border-top: 1px solid #E2E8F0;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    border: 1px solid #E2E8F0;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
    background: #F7FAFC;
}

.chat-input input:focus {
    border-color: #4A90E2;
    background: white;
}

.send-btn {
    background: linear-gradient(145deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* Practice Screen */
/* ========================================
   ЭКРАН ПРАКТИК - ПОЛНОЕ ПЕРЕПИСЫВАНИЕ 1в1
======================================== */

.practices-screen {
    background: #e3f3fd !important;
    display: flex;
    flex-direction: column;
    height: 100vh; /* Фиксированная высота для скролла */
    max-height: 100vh;
    padding: 16px;
    padding-top: 20px; /* Уменьшили верхний отступ с 40px до 20px */
    overflow-y: auto;
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
    gap: 8px; /* 8px-сетка по ТЗ */
    position: relative;
    z-index: 1; /* Убеждаемся что экран на переднем плане */
    box-sizing: border-box; /* Учитываем padding в высоте */
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
}

/* 1. Заголовок - точно по макету */
.practices-header {
    margin-bottom: 12px; /* Уменьшили отступ от заголовка до фильтров с 16px до 12px */
}

.practices-title {
    font-size: 18px;
    font-weight: bold;
    color: #4A90E2 !important;
    margin: 0;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    z-index: 10; /* Поднимаем заголовок */
}

/* 2. Фильтры - точно по макету */
.practices-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
    margin-top: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
    position: relative;
    z-index: 20;
    min-height: 44px;
}

.practices-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 8px 16px; /* Уменьшили padding для более плоских кнопок */
    border-radius: 16px;
    border: 1.5px solid #2E6BEB;
    background: #2E6BEB; /* Неактивные кнопки - синий фон */
    color: #FFFFFF; /* Неактивные кнопки - белый текст */
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center; /* Центрируем содержимое */
    gap: 4px;
    min-height: 36px; /* Уменьшили высоту кнопок для плоского вида */
    height: 36px; /* Фиксированная высота - меньше */
    flex-shrink: 0;
    position: relative;
    z-index: 25; /* Максимальный z-index для кнопок фильтров */
    box-sizing: border-box; /* Учитываем border и padding */
}

.filter-btn.active {
    background: #ecf5ff !important; /* Активная кнопка - фон как экран */
    color: #2E6BEB !important; /* Активная кнопка - синий текст */
    border-color: #2E6BEB;
}

.filter-btn:hover {
    transform: scale(1.02);
}

/* Сердце - круглая кнопка с правильной логикой цветов */
.favorite-filter {
    min-width: 36px; /* Подстраиваем под новую высоту кнопок */
    width: 36px;
    height: 36px;
    justify-content: center;
    border-radius: 50% !important; /* Делаем круглой */
    padding: 6px !important; /* Уменьшили padding под новую высоту */
}

.favorite-filter svg {
    width: 16px;
    height: 16px;
    stroke: #FFFFFF !important; /* Неактивное сердце - белая обводка на синем фоне */
    fill: none;
    stroke-width: 2; /* Увеличили толщину для лучшей видимости */
}

.filter-btn.active.favorite-filter svg {
    stroke: #2E6BEB !important; /* Активное сердце - синяя обводка на светлом фоне */
    stroke-width: 2;
}

/* 3. Контент практик */
.practices-content {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Более плотная композиция по ТЗ */
    flex: 1;
    overflow-y: visible; /* Позволяем содержимою выходить за пределы для скролла родителя */
    min-height: 0; /* Важно для работы flex overflow */
}

/* Прозрачный блок-спейсер снизу чтобы последняя карточка не перекрывалась меню */
.practices-content::after {
    content: '🔵 КОНЕЦ КОНТЕНТА 🔵';
    display: block;
    text-align: center;
    padding: 32px; /* Уменьшили с 40px на 20% */
    background: transparent; /* Полностью прозрачный */
    color: transparent; /* Текст прозрачный */
    font-size: 20px;
    font-weight: bold;
    margin-top: 16px; /* Уменьшили с 20px на 20% */
    opacity: 0; /* Еще слой прозрачности для надежности */
}

/* 4. Ряд карточек - точно по макету */
.practice-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 2px;
}

/* 5. Карточка План на день - 1в1 макет */
.plan-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    min-height: 100px; /* Уменьшили высоту с 120px до 100px */
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: flex-start; /* Без сердца */
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #4A90E2;
    margin: 0;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Убрали сердце из карточки */
.card-favorite {
    display: none;
}

.plan-items {
    display: flex;
    flex-direction: column;
    gap: 1px !important; /* Минимальное расстояние между кнопками с !important */
    flex: 1;
}

.practices-screen .plan-item,
.plan-items .plan-item {
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    height: 32px !important;
    border: 1px solid #2E6BEB !important;
    background: #FFFFFF !important;
    color: #2E6BEB !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: left !important; /* Выравнивание по левому краю */
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important; /* Выравнивание содержимого по левому краю */
    margin: 0 !important; /* Убираем все отступы с !important */
    margin-bottom: 0 !important;
}

.plan-item.active {
    background: #2E6BEB !important;
    color: white !important;
    border-color: #2E6BEB;
}

.plan-item:hover:not(.active) {
    background: #F8FAFC;
    border-color: #2E6BEB;
}

/* 6. Карточка Вечерняя йога - стеклянный с синим градиентом */
.evening-card {
    background: linear-gradient(135deg, rgba(46,107,235,0.8) 0%, rgba(46,107,235,0.6) 50%, rgba(46,107,235,0.4) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(46,107,235,0.25);
    display: flex;
    align-items: flex-start; /* Выравниваем по верху */
    justify-content: flex-start; /* Выравниваем по левому краю */
    min-height: 100px; /* Уменьшили высоту с 120px до 100px */
}

.evening-title {
    font-size: 16px; /* Увеличили размер текста с 14px до 16px */
    font-weight: bold;
    color: #FFFFFF; /* Белый цвет текста на синем градиенте */
    margin: 0;
    text-align: left; /* Выравнивание по левому краю */
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* 7. Карточка Медитация - по макету */
.meditation-card {
    background: linear-gradient(135deg, #F8FCFF 0%, #F0F8FF 100%);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.meditation-info {
    flex: 1;
}

.meditation-title {
    font-size: 16px;
    font-weight: bold;
    color: #4A90E2;
    margin: 0 0 10px 0; /* Увеличили отступ под заголовком */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    z-index: 15; /* Еще выше для лучшей видимости */
}

.meditation-tags {
    display: flex;
    gap: 6px;
}

/* Чипы медитации - прозрачный фон с обводкой как у иконок */
.meditation-tags .tag {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #4A90E2;
    border-radius: 12px;
    font-size: 12px;
    color: #4A90E2;
    font-weight: 500;
    white-space: nowrap;
    cursor: default;
}

/* Остальные теги - оригинальный стиль */
.tag {
    padding: 4px 12px;
    background: #EAF3FF;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    color: #2E6BEB;
    font-weight: 500;
    white-space: nowrap;
}

.meditation-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2E6BEB;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.meditation-play-btn:hover {
    transform: scale(1.05);
}

.meditation-play-btn svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

/* 8. Карточка Превью - новая структура */
.preview-card {
    background: linear-gradient(135deg, #F8FCFF 0%, #F0F8FF 100%);
    border-radius: 20px;
    padding: 20px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2px;
    min-height: 160px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Стеклянный оверлей поверх всей области */
.preview-glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

.preview-glass-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 200;
    color: #B0B0B0;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 2;
}

/* Центральная кнопка play - фиксированное позиционирование */
.preview-center-play-btn {
    position: absolute !important;
    top: calc(50% - 24px) !important;
    left: calc(50% - 24px) !important;
    width: 48px !important;
    height: 48px !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    z-index: 10;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    transform: none !important;
}

.preview-center-play-btn:hover {
    opacity: 0.8;
    filter: drop-shadow(0 4px 12px rgba(74, 144, 226, 0.4));
}

.preview-center-play-btn:active {
    opacity: 0.6;
    transform: scale(0.95) !important;
    transition: all 0.1s ease;
}

/* Кнопки рубля и сердца */
.preview-card .preview-price {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 15 !important;
    transform: none !important;
    margin: 0 !important;
}

.preview-card .preview-favorite {
    position: absolute !important;
    bottom: 16px !important;
    right: 16px !important;
    z-index: 15 !important;
    transform: none !important;
    margin: 0 !important;
}

/* Заголовок поверх всей области */
.preview-title-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin: 0;
    z-index: 12;
    padding: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.preview-label {
    font-size: 12px;
    color: #A0A0A0;
    text-align: center;
}

.preview-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

/* Прозрачные круги с тонкой обводкой - размер 32px по ТЗ */
.preview-price,
.preview-favorite {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: 1px solid #4A90E2 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    color: #4A90E2 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    outline: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.preview-price:hover,
.preview-favorite:hover {
    border-color: #357ABD !important;
    color: #357ABD !important;
    background: rgba(74, 144, 226, 0.1) !important;
    transform: none !important;
    outline: none !important;
}

.preview-price:active,
.preview-favorite:active {
    border-color: #357ABD !important;
    color: #357ABD !important;
    background: rgba(74, 144, 226, 0.2) !important;
    transform: none !important;
    outline: none !important;
    transition: all 0.1s ease;
}

/* Не красное сердце! */
.preview-favorite.active {
    color: #A0A0A0;
    border-color: #E0E0E0;
}

.preview-title {
    font-size: 14px;
    font-weight: 500;
    color: #4A90E2;
    margin: 0;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.2;
}

/* 9. Нижнее меню (табар) - 1в1 макет */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    padding: 12px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
}

.nav-item:hover {
    background: rgba(46,107,235,0.1);
}

/* Активная синяя, остальные серые */
.nav-item.active .nav-icon svg {
    color: #2E6BEB;
}

.nav-item:not(.active) .nav-icon svg {
    color: #A0A0A0;
}

/* Уменьшили иконки на 10-15% */
.nav-icon svg {
    width: 20px;
    height: 20px;
    transition: color 0.2s ease;
}

/* ========================================
   EMOJI FIXES
======================================== */

/* Ограничиваем размер всех emoji изображений */
img.emoji {
    height: 1.2em !important;
    width: 1.2em !important;
    margin: 0 0.05em 0 0.1em !important;
    vertical-align: -0.1em !important;
    display: inline !important;
}

/* Для значков в календаре */
.day-badge img.emoji {
    height: 14px !important;
    width: 14px !important;
    margin: 0 !important;
}

/* ========================================
   ПРОФИЛЬ
======================================== */

/* Profile Screen */
.profile-screen {
    padding: 0;
    background: linear-gradient(135deg, #E8F4FD 0%, #D6E8FC 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.profile-header {
    padding: 20px;
    margin-bottom: 20px;
}

.profile-title {
    font-size: 20px;
    color: #4A90E2;
    font-weight: 600;
    margin: 0;
}

.profile-content {
    padding: 0 20px;
    flex: 1;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 60px 20px 30px;
    margin-bottom: 30px;
    margin-top: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
}

.profile-avatar-container {
    display: flex;
    justify-content: center;
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #4A90E2;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.achievement-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.achievement-slot {
    width: 80px;
    height: 80px;
    border: 2px solid #4A90E2;
    border-radius: 12px;
    position: relative;
    background: #F7FAFC;
}

.achievement-placeholder {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #E8F4FD;
    border: 2px solid #4A90E2;
}

/* Subscription Status */
.subscription-status {
    text-align: center;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 12px;
    background: #f7f7f7;
    transition: all 0.3s ease;
}

.subscription-status.loading {
    color: #666;
}

.subscription-status.active {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border: 1px solid #4caf50;
}

.subscription-status.inactive {
    background: linear-gradient(135deg, #ffebee 0%, #fff5f5 100%);
    border: 1px solid #f44336;
}

.subscription-badge {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.subscription-status.active .subscription-badge {
    color: #2e7d32;
}

.subscription-status.inactive .subscription-badge {
    color: #c62828;
}

.subscription-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.subscription-hint {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.profile-menu-block {
    background: linear-gradient(135deg, #F8FCFF 0%, #F0F8FF 100%);
    border-radius: 20px;
    padding: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-menu-item {
    background: transparent;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-menu-item:not(:last-child) {
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
    margin-bottom: 8px;
    padding-bottom: 12px;
}

.profile-menu-item:hover {
    background: rgba(255,255,255,0.5);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item-text {
    font-size: 16px;
    color: #2C3E50;
    font-weight: 500;
}

.menu-arrow {
    width: 20px;
    height: 20px;
}

/* Mood Tracking */
.mood-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.mood-btn {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mood-btn:hover, .mood-btn.selected {
    border-color: #4A90E2;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    transform: translateY(-2px);
}

.mood-chart {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 480px) {
    .splash-title h1 {
        font-size: 36px;
    }

    .menu-options {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    /* Уменьшаем отступы на мобильных для главного экрана */
    .main-screen {
        padding: 8px 8px 20px 8px !important;
    }

    .main-container {
        padding: 16px !important;
    }
}

/* Loading and transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Utility classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }/* ===== fixes 2025-09-18: calendar visuals & background ===== */
.calendar-section {
    background: transparent;
    padding-top: 24px;
}

.calendar-container {
    padding-top: 8px;
}

.calendar-days {
    overflow: visible;
}

.calendar-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    margin-top: 8px;
    height: 12px;
}

.day-indicator,
.day-indicator-placeholder {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 auto;
    position: static;
}

.day-indicator {
    background: #4A90E2;
}

.day-indicator-placeholder {
    background: transparent;
    border: 1px solid rgba(74, 144, 226, 0.3);
}
/* ===== end fixes ===== */
/* ===== spacing tweak 2025-09-18 ===== */
.calendar-indicators { margin-top: 4px; }
.greeting-section { margin-top: 8px; margin-bottom: 14px; }
.mood-section { margin-top: 0; }
.chart-container { margin-top: 8px; margin-bottom: 10px; }
/* ===== end spacing tweak ===== */
/* ===== spacing tweak 2 (top/between calendar and greeting) ===== */
.main-screen { padding: 8px 20px 20px 20px; }
.calendar-section { padding-top: 8px; margin-bottom: 10px; }
.month-label { margin-bottom: 8px; }
.calendar-container { padding-bottom: 6px; }
.calendar-indicators { margin-top: 2px; height: 10px; }
.greeting-section { margin-top: 2px; margin-bottom: 10px; }
/* ===== end spacing tweak 2 ===== */
/* ===== emoji styling for twemoji ===== */
.twemoji { width: 22px; height: 22px; vertical-align: middle; }
.mood-emoji .twemoji { width: 28px; height: 28px; }
.mood-header .mood-profile-icon svg { width: 24px; height: 24px; }
/* ===== end emoji styling ===== */


/* CSSFIX - 2025-09-18: spacing, sizes tuning per mock */
.greeting-section { margin-bottom: 16px; }
.greeting-section p { margin-bottom: 6px; font-size: 14px; }
.greeting-section h2 { font-size: 28px; }

/* Calendar badge emoji smaller */
.day-badge { font-size: 10px; width: 16px; height: 16px; top: -4px; right: -4px; }

/* Bottom nav compact */
.bottom-nav {
    padding: 8px 6px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.nav-item { padding: 6px 4px; }
.nav-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B0B0B0;
}

.nav-item.active .nav-icon {
    color: #4A90E2;
}

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

.nav-icon svg path {
    fill: #B0B0B0;
    transition: fill 0.3s ease;
}

.nav-item.active .nav-icon svg path {
    fill: #4A90E2;
}

/* Mood selector emojis slightly smaller */
.mood-emoji {
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mood-emoji:hover {
    transform: scale(1.1);
}
.mood-emoji.selected {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Indicators under calendar centered and fixed size */
.calendar-indicators { height: 8px; }
.day-indicator, .day-indicator-placeholder { width: 6px; height: 6px; border-radius: 50%; flex: none; }


/* HOTFIX 2025-09-18: restore layout, remove crowns, show chart */
.calendar-day.completed::after { content: none !important; }
.day-badge { top: -10px !important; right: -6px !important; }
.bottom-nav {
    position: fixed !important;
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    flex-direction: row !important;
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
}
.nav-item {
    flex: none !important;
    width: 56px !important;
    height: 48px !important;
}
#moodChart { width: 100% !important; height: 140px !important; }
.chart-container { min-height: 160px !important; background: #F3F6FA !important; }

.day-circle { position: relative; }
.day-circle .day-badge { position: absolute; top: -6px; right: -6px; }

/* HOTFIX 2025-09-18: badge top-right over day circle even if sibling */
.calendar-day { position: relative; }
.calendar-day .day-badge { position: absolute; top: -6px; right: 10px; z-index: 2; font-size: 12px; }

/* HOTFIX 2025-09-18: badge top-right over day circle even if sibling */
.calendar-day { position: relative; }
.calendar-day .day-badge { position: absolute; top: -6px; right: 10px; z-index: 2; font-size: 12px; }

/* Calendar day selection highlight */
.calendar-day {
    transition: all 0.2s ease;
}
.calendar-day .day-circle {
    transition: all 0.2s ease;
}
.calendar-day.selected .day-circle {
    background: #E3F2FD !important;
    border: 2px solid #1976D2 !important;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2) !important;
    transform: scale(1.05);
}
.calendar-day.selected .day-number {
    color: #1976D2 !important;
    font-weight: 600;
}

/* UI 2025-09-18: capsule around mood selector + chart */
.mood-section {
  background: #EEF4FF; /* light capsule */
  border-radius: 20px;
  padding: 14px 16px 16px;
  box-shadow: 0 6px 20px rgba(37,84,165,0.12);
}
/* tighten blue bar spacing inside capsule */
.mood-selector { margin: 10px 0 14px; }
.chart-container { margin-top: 0; }


/* UI 2025-09-18: softer greeting title */
.greeting-section h2 { font-size: 24px !important; font-weight: 600 !important; line-height: 1.1; }


/* UI 2025-09-18: unify horizontal paddings and shift content slightly right */
.main-container { padding-left: 24px !important; padding-right: 24px !important; }
.calendar-section, .greeting-section, .mood-section { margin-left: 0 !important; margin-right: 0 !important; }
/* ensure capsule does not overflow */
.mood-section { box-sizing: border-box; width: 100%; }


/* UI 2025-09-18: greeting thinner */
.greeting-section h2 { font-weight: 500 !important; }

/* UI 2025-09-18: thinner greeting title */
.greeting-section h2 { font-weight: 400 !important; }

/* UI 2025-09-18: thinner greeting title */
.greeting-section h2 { font-weight: 400 !important; }

/* UI 2025-09-18: thinner greeting title */
.greeting-section h2 { font-weight: 400 !important; }

/* UI 2025-09-18: thinner greeting title */
.greeting-section h2 { font-weight: 400 !important; }


/* UI 2025-09-18: onboarding blue for greeting and emoji bar */
.greeting-section h2 { color: #1976D2 !important; }
.mood-section .mood-selector { background: #1976D2 !important; }
.mood-section .mood-selector .mood-emoji { filter: none; }

/* UI 2025-09-18: onboarding blue for greeting and emoji bar */
.greeting-section h2 { color: #1976D2 !important; }
.mood-section .mood-selector { background: #1976D2 !important; }

/* ========================================
   ТЕКСТОВЫЙ ЧАТ С АССИСТЕНТОМ - ПО МАКЕТУ
======================================== */

/* Экран чата */
.chat-screen {
    background: #e3f3fd !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.chat-screen.active {
    z-index: 10;
}

/* Header чата */
.chat-header {
    height: 60px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

.chat-left-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 40px;
}

.chat-right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-new-btn {
    background: none;
    border: none;
    color: #4A90E2;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chat-new-btn:hover {
    transform: scale(1.1);
}

.chat-new-btn:active {
    transform: scale(0.95);
}

.chat-back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #4A90E2;
    cursor: pointer;
    padding: 4px;
    min-width: 24px;
}

.chat-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #4A90E2;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    background: none;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Сообщения чата */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    margin-bottom: 12px;
    max-width: 85%;
}

/* Сообщения ассистента (слева, серые) */
.message.assistant {
    align-self: flex-start;
}

.message.assistant .message-content {
    background: transparent;
    color: #2C3E50;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 16px;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0;
    word-spacing: 0;
}

/* Сообщения пользователя (справа, голубые) */
.message.user {
    align-self: flex-end;
}

.message.user .message-content {
    background: transparent;
    color: white;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 16px;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0;
    word-spacing: 0;
}

.message-subtext {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.8;
}

/* Исправление размера эмодзи в сообщениях */
.chat-messages img.emoji,
.chat-messages .twemoji {
    height: 1.2em !important;
    width: 1.2em !important;
    display: inline !important;
    vertical-align: text-bottom !important;
    margin: 0 0.1em !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Отключить twemoji для области чата */
.chat-messages {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
    letter-spacing: normal;
    word-spacing: normal;
}

.chat-messages * {
    font-family: inherit;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: 1.4;
}

.message-content {
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.message-content p {
    margin: 0;
    padding: 0;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: 1.4;
}

/* Нижняя панель ввода */
.chat-input-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    margin: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
}

.chat-add-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.chat-add-btn:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: scale(1.1);
}

#chatInput,
#dreamsInput,
#analysisInput,
#generalVoiceInput,
#analysisChatInput {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    padding: 12px 4px;
    min-width: 0;
}

#chatInput::placeholder,
#dreamsInput::placeholder,
#analysisInput::placeholder,
#generalVoiceInput::placeholder,
#analysisChatInput::placeholder {
    color: #4A90E2;
    opacity: 0.7;
}

.chat-voice-btn-wrapper {
    flex-shrink: 0;
}

.chat-input-container.voice-active {
    justify-content: stretch;
}

.chat-input-container.voice-active .voice-recorder-active,
.chat-input-container.voice-active .voice-recorder-preview {
    flex: 1;
    width: 100%;
}

.chat-voice-btn {
    background: #4A90E2;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.chat-voice-btn:hover {
    transform: scale(1.05);
    background: #357ABD;
}

.chat-voice-btn:active {
    transform: scale(0.95);
}

.voice-record-start-btn {
    background: #4A90E2;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.voice-record-start-btn:hover {
    transform: scale(1.05);
    background: #357ABD;
}

.voice-record-start-btn:active {
    transform: scale(0.95);
}

.voice-recorder-active {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-cancel-btn {
    background: #f44336;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-recording-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f44336;
    animation: pulse 1.5s infinite;
}

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

.voice-timer {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.voice-stop-btn {
    background: #4A90E2;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Voice Recorder Preview */
.voice-recorder-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 20px;
}

.voice-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: transform 0.2s ease;
}

.voice-delete-btn:hover {
    transform: scale(1.1);
}

.voice-delete-btn:active {
    transform: scale(0.95);
}

.voice-preview-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-duration {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.voice-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: transform 0.2s ease;
}

.voice-play-btn:hover {
    transform: scale(1.1);
}

.voice-play-btn:active {
    transform: scale(0.95);
}

.voice-send-btn {
    background: #4A90E2;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.voice-send-btn:hover {
    transform: scale(1.05);
    background: #357ABD;
}

.voice-send-btn:active {
    transform: scale(0.95);
}

/* cache-bust 1759000003 */

/* ========================================
   ГОЛОСОВОЙ ЧАТ С АССИСТЕНТОМ - ПО ТЗ
======================================== */

/* Экран голосового чата */
.voice-chat-screen {
    background: #e3f3fd !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.voice-chat-screen.active {
    z-index: 10;
}

/* 1. Верхняя панель (Header) - высота ~60px */
.voice-header {
    height: 60px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

.voice-left-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #4A90E2;
    cursor: pointer;
    padding: 4px;
    min-width: 24px;
}

.voice-multitask-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-multitask-icon:hover {
    opacity: 0.7;
}

.voice-multitask-icon:active {
    opacity: 0.5;
}

.voice-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #4A90E2;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    background: none;
}

.voice-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.voice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. Зона сообщений (Chat area) */
.voice-messages {
    flex: 1;
    padding: 20px 20px 10px 20px;
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
    overflow-y: auto;
    justify-content: flex-start;
}

/* Голосовые сообщения */
.voice-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 25px;
    max-width: 80%;
    width: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.voice-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.assistant-message .voice-play-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

.user-message .voice-play-btn:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

/* Сообщение ассистента - слева */
.assistant-message {
    background: #FFFFFF;
    border: 1px solid #E0E7FF;
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0;
}

.assistant-message .voice-play-btn {
    background: linear-gradient(135deg, #4A90E2 0%, #6BA3D6 100%);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
    transition: all 0.2s ease;
}

.assistant-message .voice-play-btn svg {
    margin-left: 1px;
}

.assistant-message .voice-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
    min-width: 120px;
    padding: 0 8px;
}

.assistant-message .wave-bar {
    width: 3px;
    background: linear-gradient(135deg, #4A90E2 0%, #6BA3D6 100%);
    border-radius: 2px;
    transition: all 0.3s ease;
    animation: wave-pulse 2s ease-in-out infinite;
    opacity: 0.8;
}

/* Сообщение пользователя - справа */
.user-message {
    background: #4A90E2;
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
}

.user-message .voice-play-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 16px;
    cursor: pointer;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.user-message .voice-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
    min-width: 100px;
    padding: 0 8px;
}

.user-message .wave-bar {
    width: 3px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
    opacity: 0.9;
}

/* 3. Нижняя панель (Bottom controls) - высота ~100px */
.voice-bottom-controls {
    height: 100px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 20px;
    z-index: 1;
}

.voice-add-btn, .voice-keyboard-btn {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(107, 163, 214, 0.1) 100%);
    border: 1px solid rgba(74, 144, 226, 0.2);
    cursor: pointer;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.15);
}

.voice-add-btn:hover, .voice-keyboard-btn:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(107, 163, 214, 0.2) 100%);
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25);
    border-color: rgba(74, 144, 226, 0.4);
}

/* Центральная кнопка микрофона */
.voice-mic-btn {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #7D5FFF 0%, #FF4D8D 50%, #4DBDFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(125, 95, 255, 0.5), 0 0 0 0 rgba(125, 95, 255, 0.4);
    position: relative;
    animation: pulse-ring 2s infinite;
}

.voice-mic-btn::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7D5FFF 0%, #FF4D8D 50%, #4DBDFF 100%);
    z-index: -1;
    opacity: 0.2;
    filter: blur(12px);
    animation: glow-pulse 3s ease-in-out infinite alternate;
}

.voice-mic-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(125, 95, 255, 0.6), 0 0 0 8px rgba(125, 95, 255, 0.1);
    box-shadow: 0 6px 30px rgba(125, 95, 255, 0.6);
}

.voice-mic-btn:active {
    transform: scale(0.95);
}

.voice-mic-btn.recording {
    animation: mic-pulse 1.2s ease-in-out infinite;
}

/* Анимации */
@keyframes wave-pulse {
    0%, 100% {
        transform: scaleY(0.8);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1.8);
        opacity: 1;
    }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 8px 32px rgba(125, 95, 255, 0.5), 0 0 0 0 rgba(125, 95, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(125, 95, 255, 0.5), 0 0 0 8px rgba(125, 95, 255, 0.1);
    }
    100% {
        box-shadow: 0 8px 32px rgba(125, 95, 255, 0.5), 0 0 0 0 rgba(125, 95, 255, 0);
    }
}

@keyframes glow-pulse {
    0% {
        opacity: 0.2;
        filter: blur(12px);
    }
    100% {
        opacity: 0.4;
        filter: blur(16px);
    }
}

@keyframes mic-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(100, 100, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(100, 100, 255, 0.8);
    }
}

/* Адаптивность */
@media (max-width: 480px) {
    .voice-bottom-controls {
        gap: 30px;
    }

    .voice-mic-btn {
        width: 64px;
        height: 64px;
    }

    .mic-icon {
        font-size: 24px;
    }
}

/* UI 2025-09-18: chart rounding + header color + dates */
.mood-section h3,
.mood-section .mood-title,
.mood-header h3,
.mood-header {
  color: #1976D2 !important;
}
.chart-container {
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
#moodChart {
  border-radius: 16px !important;
  display: block;
}
.chart-dates, .chart-x, .chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #1565C0;
  font-size: 12px;
}

/* UI 2025-09-18: chart rounding + header color + dates */
.mood-section h3,
.mood-section .mood-title,
.mood-header h3,
.mood-header {
  color: #1976D2 !important;
}
.chart-container {
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
#moodChart {
  border-radius: 16px !important;
  display: block;
}
.chart-dates, .chart-x, .chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #1565C0;
  font-size: 12px;
}

/* ============================================================
   КРИТИЧЕСКИЙ FIX: КНОПКИ ПЛАНА НА ДЕНЬ - ФИНАЛЬНАЯ ВЕРСИЯ
   ============================================================ */
.practices-screen .plan-card .plan-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 0px !important; /* НОЛЬ отступов между кнопками */
    flex: 1 !important;
}

.practices-screen .plan-card .plan-items .plan-item {
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    height: 32px !important;
    border: 1px solid #2E6BEB !important;
    background: #FFFFFF !important;
    color: #2E6BEB !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: left !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.practices-screen .plan-card .plan-items .plan-item.active {
    background: #2E6BEB !important;
    color: white !important;
    border-color: #2E6BEB !important;
}

/* ============================================================
   BOTTOM NAVIGATION - КОМПАКТНАЯ ВЕРСИЯ
   ============================================================ */
.bottom-nav {
    padding: 6px 60px !important; /* Увеличили padding для размещения обводки */
    min-height: 52px !important; /* Чуть увеличили высоту для обводки */
    width: 60% !important; /* Уменьшили ширину панели до 60% */
    max-width: none !important; /* Отключаем max-width */
    margin: 0 auto !important; /* Центрируем */
    gap: 2px !important; /* Кнопки еще ближе друг к другу */
    overflow: visible !important; /* Позволяем обводке выходить за границы если нужно */
    box-sizing: border-box !important; /* Учитываем padding в общей ширине */
}

.nav-item {
    padding: 8px 12px !important; /* Увеличили размер кнопок */
    min-width: 56px !important; /* Увеличили ширину кнопок */
    flex: none !important; /* Кнопки НЕ растягиваются - остаются фиксированного размера */
}

/* ============================================================
   ЭКРАН ВОСПРОИЗВЕДЕНИЯ МЕДИТАЦИИ - ПО МАКЕТУ
   ============================================================ */

/* Основной экран медитации */
#practice-player-screen {
    background: linear-gradient(180deg, #e3f3fd 0%, #f0f8ff 100%) !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

#practice-player-screen.active {
    z-index: 10;
}

/* Верхняя панель */
.player-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: relative;
    margin-top: 20px;
    margin-bottom: 40px;
}

.player-header .back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: #4A90E2;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    font-weight: 300;
    z-index: 10;
}

.player-header h3 {
    color: #4A90E2;
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    width: 100%;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Центральная область с дыхательным кругом */
.player-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    gap: 60px;
}

/* Дыхательный пузырь */
.breathing-orb {
    width: 280px;
    height: 280px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: breathing-wave 4s ease-in-out infinite;
}

.bubble-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.orb-gradient {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:
        radial-gradient(ellipse 120% 80% at 30% 20%, rgba(247, 230, 255, 0.9) 0%, transparent 50%),
        radial-gradient(ellipse 100% 120% at 70% 70%, rgba(207, 231, 255, 0.8) 0%, transparent 50%),
        linear-gradient(135deg,
            rgba(236, 240, 255, 0.95) 0%,
            rgba(213, 230, 255, 0.9) 30%,
            rgba(249, 215, 241, 0.85) 60%,
            rgba(233, 221, 255, 0.9) 100%);
    animation:
        organic-morph 8s ease-in-out infinite,
        iridescent-shift 6s linear infinite;
    transform-origin: center;
}

.orb-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: conic-gradient(
        from 0deg at 50% 50%,
        rgba(255, 255, 255, 0.4) 0deg,
        rgba(247, 230, 255, 0.3) 60deg,
        rgba(207, 231, 255, 0.3) 120deg,
        rgba(249, 215, 241, 0.3) 180deg,
        rgba(233, 221, 255, 0.3) 240deg,
        rgba(213, 230, 255, 0.3) 300deg,
        rgba(255, 255, 255, 0.4) 360deg
    );
    border-radius: inherit;
    animation: holographic-rotate 10s linear infinite;
    mix-blend-mode: soft-light;
}

.orb-gradient::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 35%;
    height: 35%;
    background:
        radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.4) 30%,
            rgba(247, 230, 255, 0.2) 60%,
            transparent 80%);
    border-radius: 60% 40% 70% 30%;
    filter: blur(15px);
    animation: pearl-highlight 5s ease-in-out infinite;
    mix-blend-mode: screen;
}

/* Текст в центре круга */
.breathing-text {
    color: #FFFFFF;
    font-size: 36px;
    font-weight: 500;
    z-index: 10;
    position: relative;
    text-align: center;
    text-shadow: 0 4px 16px rgba(74, 144, 226, 0.6);
    letter-spacing: 1px;
}

/* Таймер */
.player-timer {
    color: #4A90E2;
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    letter-spacing: -1px;
}

/* Кнопка управления */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
}

.player-pause-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #4A90E2;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.4);
}

.player-pause-btn:active {
    transform: scale(0.95);
}

/* Анимации в стиле Three.js blob */
@keyframes breathing-wave {
    0%, 100% {
        transform: scale(1) rotateY(0deg) rotateX(0deg);
        filter:
            drop-shadow(0 0 40px rgba(247, 230, 255, 0.6))
            drop-shadow(0 0 80px rgba(207, 231, 255, 0.4))
            drop-shadow(0 0 120px rgba(249, 215, 241, 0.3));
    }
    50% {
        transform: scale(1.08) rotateY(5deg) rotateX(2deg);
        filter:
            drop-shadow(0 0 60px rgba(247, 230, 255, 0.8))
            drop-shadow(0 0 120px rgba(207, 231, 255, 0.6))
            drop-shadow(0 0 180px rgba(249, 215, 241, 0.5));
    }
}

@keyframes organic-morph {
    0% {
        border-radius: 50% 45% 55% 50% / 55% 50% 45% 55%;
        transform: rotate(0deg) scale(1);
    }
    25% {
        border-radius: 45% 55% 50% 45% / 50% 55% 50% 45%;
        transform: rotate(90deg) scale(1.02);
    }
    50% {
        border-radius: 55% 50% 45% 55% / 45% 50% 55% 50%;
        transform: rotate(180deg) scale(0.98);
    }
    75% {
        border-radius: 50% 45% 55% 50% / 50% 45% 50% 55%;
        transform: rotate(270deg) scale(1.01);
    }
    100% {
        border-radius: 50% 45% 55% 50% / 55% 50% 45% 55%;
        transform: rotate(360deg) scale(1);
    }
}

@keyframes iridescent-shift {
    0% {
        background:
            radial-gradient(ellipse 120% 80% at 30% 20%, rgba(247, 230, 255, 0.9) 0%, transparent 50%),
            radial-gradient(ellipse 100% 120% at 70% 70%, rgba(207, 231, 255, 0.8) 0%, transparent 50%),
            linear-gradient(135deg,
                rgba(236, 240, 255, 0.95) 0%,
                rgba(213, 230, 255, 0.9) 30%,
                rgba(249, 215, 241, 0.85) 60%,
                rgba(233, 221, 255, 0.9) 100%);
    }
    33% {
        background:
            radial-gradient(ellipse 100% 120% at 70% 30%, rgba(207, 231, 255, 0.9) 0%, transparent 50%),
            radial-gradient(ellipse 120% 80% at 30% 70%, rgba(249, 215, 241, 0.8) 0%, transparent 50%),
            linear-gradient(135deg,
                rgba(213, 230, 255, 0.95) 0%,
                rgba(249, 215, 241, 0.9) 30%,
                rgba(233, 221, 255, 0.85) 60%,
                rgba(236, 240, 255, 0.9) 100%);
    }
    66% {
        background:
            radial-gradient(ellipse 80% 100% at 20% 80%, rgba(249, 215, 241, 0.9) 0%, transparent 50%),
            radial-gradient(ellipse 120% 90% at 80% 20%, rgba(233, 221, 255, 0.8) 0%, transparent 50%),
            linear-gradient(135deg,
                rgba(249, 215, 241, 0.95) 0%,
                rgba(233, 221, 255, 0.9) 30%,
                rgba(236, 240, 255, 0.85) 60%,
                rgba(213, 230, 255, 0.9) 100%);
    }
    100% {
        background:
            radial-gradient(ellipse 120% 80% at 30% 20%, rgba(247, 230, 255, 0.9) 0%, transparent 50%),
            radial-gradient(ellipse 100% 120% at 70% 70%, rgba(207, 231, 255, 0.8) 0%, transparent 50%),
            linear-gradient(135deg,
                rgba(236, 240, 255, 0.95) 0%,
                rgba(213, 230, 255, 0.9) 30%,
                rgba(249, 215, 241, 0.85) 60%,
                rgba(233, 221, 255, 0.9) 100%);
    }
}

@keyframes holographic-rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.05);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes pearl-highlight {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.8;
    }
    33% {
        transform: translate(5px, -3px) scale(1.1) rotate(120deg);
        opacity: 0.9;
    }
    66% {
        transform: translate(-2px, 8px) scale(0.9) rotate(240deg);
        opacity: 0.7;
    }
}

/* Анимация вдоха/выдоха для пузыря */
.breathing-orb.inhale {
    animation: inhale-bubble 4s ease-in-out;
}

.breathing-orb.exhale {
    animation: exhale-bubble 4s ease-in-out;
}

@keyframes inhale-bubble {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.15)
            drop-shadow(0 0 240px rgba(249, 215, 241, 0.6));
    }
}

@keyframes exhale-bubble {
    0% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
            drop-shadow(0 0 40px rgba(247, 230, 255, 0.6))
            drop-shadow(0 0 80px rgba(207, 231, 255, 0.4));
    }
}
/* ========================================
   ЭКРАН ИСТОРИИ ЧАТОВ - ПО РЕФЕРЕНСУ
======================================== */

/* Заголовок экрана истории */
.chat-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: transparent;
    height: 60px;
    position: relative;
    margin-bottom: 10px;
}

.history-left-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 40px;
}

.chat-history-header .back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #4A90E2;
    cursor: pointer;
    padding: 4px;
    min-width: 24px;
    margin: 0;
}

.chat-history-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-history-icon:hover {
    opacity: 0.7;
}

.chat-history-icon:active {
    opacity: 0.5;
}

.chat-history-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 17px;
    font-weight: 600;
    color: #4A90E2;
    margin: 0;
}

.history-right-controls {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-chat-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #4A90E2;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Контент с историей */
.history-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #e3f3fd;
}

.history-group {
    margin-bottom: 32px;
}

.history-date {
    font-size: 18px;
    font-weight: 600;
    color: #4A90E2;
    margin: 0 0 16px 0;
    padding-left: 4px;
}

.history-item {
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 16px;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.history-item:hover {
    background: rgba(74, 144, 226, 0.08);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.history-item:active {
    transform: translateX(2px) scale(0.98);
}

.history-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 8px;
    text-align: right;
    line-height: 1.4;
}

.history-item-preview {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
    margin-bottom: 8px;
}

.history-item-meta {
    font-size: 13px;
    color: #4A90E2;
    text-align: right;
    opacity: 0.8;
}

/* Нижняя панель ввода */
.chat-bottom-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(74, 144, 226, 0.1);
}

.chat-new-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.15);
    border: none;
    color: #4A90E2;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.chat-new-btn:hover {
    background: rgba(74, 144, 226, 0.25);
    transform: scale(1.05);
}

.chat-new-btn:active {
    transform: scale(0.95);
}

.chat-quick-input {
    flex: 1;
    height: 48px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 24px;
    padding: 0 20px;
    font-size: 15px;
    color: #2C3E50;
    background: white;
    outline: none;
    transition: all 0.3s ease;
}

.chat-quick-input::placeholder {
    color: #4A90E2;
    opacity: 0.6;
}

.chat-quick-input:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.chat-mic-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.chat-mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25);
}

.chat-mic-btn:active {
    transform: scale(0.95);
}

/* Responsive для маленьких экранов */
@media (max-width: 400px) {
    .chat-history-header {
        padding: 0 20px;
    }

    .chat-history-title {
        font-size: 18px;
    }

    .history-content {
        padding: 16px;
    }

    .history-date {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .history-item {
        padding: 14px 16px;
        font-size: 15px;
        margin-bottom: 10px;
    }

    .chat-bottom-panel {
        padding: 12px 16px 20px;
        gap: 10px;
    }

    .chat-new-btn,
    .chat-mic-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .chat-quick-input {
        height: 44px;
        font-size: 14px;
    }
}

/* ===== ANALYSIS SCREEN ===== */
.analysis-screen {
    background: linear-gradient(135deg, #E3F2FD 0%, #F3E5F5 100%);
    padding: 20px;
    overflow-y: auto;
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.analysis-title {
    font-size: 28px;
    font-weight: 700;
    color: #1A237E;
    margin: 0;
}

.analysis-description {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.analysis-description p {
    margin: 8px 0;
    line-height: 1.6;
    color: #333;
}

.analysis-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.analysis-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.analysis-card:active {
    transform: scale(0.95);
}

.analysis-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.analysis-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1A237E;
    margin: 8px 0;
}

.analysis-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* Analysis Chat Screen */
.analysis-chat-screen,
.analysis-voice-screen {
    background: #E3F2FD;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.analysis-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.analysis-chat-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #1A237E;
    margin: 0;
}

.analysis-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.analysis-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.analysis-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.analysis-message {
    margin-bottom: 16px;
    display: flex;
}

.analysis-message.assistant {
    justify-content: flex-start;
}

.analysis-message.user {
    justify-content: flex-end;
}

.analysis-message .message-content {
    background: white;
    padding: 16px;
    border-radius: 16px;
    max-width: 80%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.analysis-message.user .message-content {
    background: #4A90E2;
    color: white;
}

.analysis-chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-top: 1px solid #E0E0E0;
}

.analysis-chat-input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 24px;
    font-size: 15px;
    outline: none;
}

.analysis-chat-input-container input:focus {
    border-color: #4A90E2;
}

/* Dreams Chat Screen */
.dreams-chat-screen,
.dreams-voice-screen {
    background: #E8EAF6;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.dreams-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dreams-chat-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #1A237E;
    margin: 0;
}

.dreams-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.dreams-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dreams-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.dreams-message {
    margin-bottom: 16px;
    display: flex;
}

.dreams-message.assistant {
    justify-content: flex-start;
}

.dreams-message.user {
    justify-content: flex-end;
}

.dreams-message .message-content {
    background: white;
    padding: 16px;
    border-radius: 16px;
    max-width: 80%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.dreams-message.user .message-content {
    background: #7E57C2;
    color: white;
}

.dreams-chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-top: 1px solid #E0E0E0;
}

.dreams-chat-input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 24px;
    font-size: 15px;
    outline: none;
}

.dreams-chat-input-container input:focus {
    border-color: #7E57C2;
}

/* Back Button Shared Styles */
.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #F5F5F5;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1A237E;
    transition: all 0.3s ease;
}

.back-btn:active {
    transform: scale(0.9);
    background: #E0E0E0;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: none;
    background: #4A90E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    background: #357ABD;
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick Access Section */
.quick-access-section {
    padding: 20px;
    margin-bottom: 80px;
}

.quick-access-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1A237E;
    margin-bottom: 16px;
}

.quick-access-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quick-card:active {
    transform: scale(0.95);
}

.quick-icon {
    font-size: 32px;
}

.quick-card span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* Agent Selection Screen */
.agent-selection-screen {
    background: #e3f3fd !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
}

.agent-description {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 0 20px 24px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.agent-description p {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.agent-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px 20px 20px;
}

.agent-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid transparent;
}

.agent-card.general {
    border-left-color: #4A90E2;
}

.agent-card.analysis {
    border-left-color: #9C27B0;
}

.agent-card.dreams {
    border-left-color: #7E57C2;
}

.agent-card:active {
    transform: scale(0.98);
}

.agent-card-icon {
    font-size: 40px;
    min-width: 56px;
    text-align: center;
}

.agent-card-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1A237E;
    margin: 0 0 4px 0;
}

.agent-card-content p {
    font-size: 14px;
    color: #666;
    margin: 0;
}
/* ===== NEW PRACTICE STYLES ===== */

.practice-category {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-title {
    font-size: 20px;
    font-weight: bold;
    color: #1A237E;
    margin: 0 0 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.category-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.practice-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.practice-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #F8FAFC;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.practice-item-card:hover {
    background: #EEF5FF;
}

.practice-item-info {
    flex: 1;
    min-width: 0;
}

.practice-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1A237E;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.practice-item-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.practice-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(74, 144, 226, 0.1);
    color: #4A90E2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.practice-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.practice-favorite-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 20;
    padding: 0;
}

.practice-favorite-btn:hover {
    transform: scale(1.15);
}

.practice-favorite-btn:active {
    transform: scale(0.9);
}

.practice-favorite-btn.active {
    /* No background - just change fill color in SVG */
}

.practice-premium-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #4A90E2;
    background: #FFFFFF;
    color: #4A90E2;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.practice-premium-btn:hover {
    background: #4A90E2;
    color: #FFFFFF;
}

.practice-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #4A90E2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.practice-play-btn:hover {
    background: #3A7BC8;
    transform: scale(1.05);
}

.practice-play-btn:active {
    transform: scale(0.95);
}

/* Empty state for categories with no items */
.practice-category:has(.practice-items:empty) .category-description {
    font-style: italic;
    color: #999;
}

/* Category Header Styles */
.category-header {
    margin: 20px 0 12px 0;
}

.category-header:first-child {
    margin-top: 0;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: #4A90E2;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Practice Favorite Button styles moved above to avoid duplication */

/* Card Favorite Button (for yoga/practice cards) */
.card-favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.card-favorite-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.card-favorite-btn:active {
    transform: scale(0.95);
}

/* Practice category styles */
.practice-category {
    margin-bottom: 0;
}

/* Remove background from practice-category to use transparent background */
.practice-category {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

/* ==========================================
   🧠 PATTERNS SCREEN (NEW)
   ========================================== */

.patterns-screen {
    padding: 20px;
    overflow-y: auto;
}

.pattern-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

/* Pattern screen specific filter buttons - use scoped selector */
.patterns-screen .filter-btn {
    padding: 8px 16px;
    border: 1px solid #E3F2FD;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.patterns-screen .filter-btn.active {
    background: #1976D2;
    color: white;
    border-color: #1976D2;
}

.patterns-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pattern-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pattern-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.pattern-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pattern-emoji {
    font-size: 32px;
}

.pattern-card-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.frequency-badge {
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.pattern-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.pattern-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.confidence-bar {
    flex: 1;
    height: 6px;
    background: #E3F2FD;
    border-radius: 3px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #4A90E2 0%, #66BB6A 100%);
    transition: width 0.3s ease;
}

.confidence-text {
    font-size: 12px;
    color: #90A4AE;
}

.pattern-badge {
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contradiction-badge {
    background: #FFEBEE;
    color: #EF5350;
}

.resource-badge {
    background: #F3E5F5;
    color: #AB47BC;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* ==========================================
   Pattern Detail Screen
   ========================================== */

.pattern-detail-screen {
    padding: 20px;
}

.pattern-detail-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 40px;
}

.pattern-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pattern-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.pattern-text {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}

.pattern-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-pill {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    background: #F5F5F5;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: #90A4AE;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Special section styles */
.alert-section {
    border-left: 4px solid #EF5350;
    background: #FFEBEE;
}

.insight-section {
    border-left: 4px solid #1976D2;
    background: #E3F2FD;
}

.resource-section {
    border-left: 4px solid #AB47BC;
    background: #F3E5F5;
}

.action-section {
    border-left: 4px solid #66BB6A;
    background: #E8F5E9;
}

/* Evidence list */
.evidence-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evidence-item {
    padding: 12px 16px;
    background: #F9FAFB;
    border-left: 3px solid #1976D2;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    font-style: italic;
    position: relative;
}

.quote-mark {
    color: #1976D2;
    font-size: 18px;
    font-weight: bold;
    opacity: 0.5;
}

/* Context weights */
.context-weights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.context-weight-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-name {
    font-size: 13px;
    color: #666;
    min-width: 100px;
    text-transform: capitalize;
}

.weight-bar {
    flex: 1;
    height: 8px;
    background: #E3F2FD;
    border-radius: 4px;
    overflow: hidden;
}

.weight-fill {
    height: 100%;
    background: linear-gradient(90deg, #4A90E2 0%, #66BB6A 100%);
    transition: width 0.3s ease;
}

.weight-percent {
    font-size: 12px;
    color: #90A4AE;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* ==========================================
   🎯 AI Insights Card on Main Screen
   ========================================== */

.ai-insights-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}

.ai-insights-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.ai-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-card-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ai-card-title {
    flex: 1;
}

.ai-card-title h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: white;
}

.ai-card-title p {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.ai-card-arrow {
    font-size: 24px;
    opacity: 0.6;
}

.ai-card-stats {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ai-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.ai-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}
