/* ===== СПЕЦИФИЧНЫЕ СТИЛИ СТРАНИЦ ===== */
/* Стили для конкретных секций и специальных элементов */

/* ===== СТРАНИЦА ПОДПИСОК ===== */

/* Sub-tabs для модальных окон */
.modal-sub-tab {
    transition: all 0.2s ease;
}

.modal-sub-tab:not(.modal-sub-tab-active):hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.modal-user-item {
    transition: all 0.2s ease;
}

.modal-user-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ===== TELEGRAM ИНТЕГРАЦИЯ ===== */

/* Убеждаемся что модальные заголовки видны в темах */

/* Убеждаемся что модальные заголовки видны */
.modal-content h3,
.modal-content h2 {
    color: var(--text-primary) !important;
}

/* Фикс для placeholder в светлой теме */
.light input::placeholder,
.light textarea::placeholder {
    color: var(--input-placeholder) !important;
    opacity: 1;
}

/* ===== УЛУЧШЕНИЯ ДЛЯ СВЕТЛОЙ ТЕМЫ "БОМБА" ===== */

/* Специфичные элементы страниц в светлой теме */
.light .search-result-item {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.light .search-result-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(6px);
}

.light .notification-item {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.light .notification-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.light .settings-item {
    color: var(--text-primary);
    border-bottom: 2px solid var(--card-border);
}

.light .error-message {
    color: var(--text-secondary);
}

.light .onboarding-step {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

.light .feed-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

.light .feed-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent-primary);
}

.light .feed-active {
    background: var(--accent-gradient) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
    box-shadow: var(--neon-glow-sm);
}

.light .stats-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-primary);
    box-shadow: var(--card-shadow);
}

.light .stats-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg), var(--shadow-colored);
}

/* Share модальное окно в светлой теме */
.light .share-link-container {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
}

.light .share-link-copy-btn {
    background: var(--btn-bg);
    border-left: 2px solid var(--input-border);
    color: var(--btn-text);
}

.light .share-link-copy-btn:hover {
    background: var(--btn-hover);
    border-left-color: var(--accent-primary);
}

/* Специальные формы в светлой теме */
.light .question-form {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    box-shadow: var(--card-shadow);
}

.light .answer-form {
    background: var(--bg-elevated);
    border-left: 4px solid var(--accent-primary);
    border: 2px solid var(--card-border);
    border-left: 4px solid var(--accent-primary);
}

.light .profile-header {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    box-shadow: var(--card-shadow);
}

.light .profile-bio {
    background: var(--bg-surface);
    border: 2px solid var(--card-border);
    border-left: 4px solid var(--accent-secondary);
}

/* Toggle switch в светлой теме */
.light .toggle-switch {
    background: rgba(156, 163, 175, 0.3);
    border: 2px solid var(--card-border);
}

.light .toggle-switch.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow-sm);
}

/* Progress dots в светлой теме */
.light .progress-dot {
    background: var(--text-muted);
    border: 2px solid transparent;
}

.light .progress-dot.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Error страницы в светлой теме */
.light .error-container {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    box-shadow: var(--shadow-xl);
}

/* Loading spinner в светлой теме */
.light .loading-spinner {
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top: 4px solid var(--accent-primary);
}

/* Stars модальное окно в светлой теме */
.light .stars-modal {
    background: var(--modal-bg);
    border: 2px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
}

.leader-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.leader-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaders-error {
    color: #ef4444;
}

.leader-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.light .payment-type-btn.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* ===== FEED КАРТОЧКИ ===== */

/* Feed фильтры */
.feed-btn {
    transition: all 0.2s ease;
}

.feed-active {
    background: var(--accent-gradient) !important;
    color: white !important;
    box-shadow: var(--neon-glow-sm);
}

/* ===== СТАТИСТИКА КАРТОЧКИ ===== */

.stats-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--card-hover);
}

/* Группы в статистике карточках будут стилизованы через существующие классы */

/* ===== ЗВЕЗДОЧКИ МОДАЛЬНОЕ ОКНО ===== */

.stars-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--modal-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.stars-modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}


/* Контент модального окна звездочек наследует стили от .modal-content */

/* ===== ПАНЕЛЬ ОТЛАДКИ ===== */

.debug-panel {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--accent-primary);
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
}

/* ===== SEARCH МОДАЛЬНОЕ ОКНО ===== */

#searchModal .modal-content {
    max-width: 600px;
}

#searchResults {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: var(--card-hover);
    transform: translateX(4px);
}

/* ===== SHARE МОДАЛЬНОЕ ОКНО ===== */

.share-link-container {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    margin-top: 8px;
}

.share-link-input {
    background: transparent;
    border: none;
    color: var(--input-text);
    padding: 12px 16px;
    flex: 1;
    outline: none;
    font-size: 14px;
}

.share-link-copy-btn {
    background: var(--btn-bg);
    border: none;
    border-left: 1px solid var(--input-border);
    color: var(--btn-text);
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-link-copy-btn:hover {
    background: var(--btn-hover);
}

/* ===== ВОПРОСЫ СТРАНИЦА ===== */

.question-form {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.question-form textarea {
    min-height: 120px;
    resize: vertical;
}

.answer-form {
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    border-left: 4px solid var(--accent-primary);
}

/* ===== ПРОФИЛЬ СТРАНИЦА ===== */

.profile-header {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.profile-bio {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid var(--accent-secondary);
}

/* ===== ЛЕНТА СТРАНИЦА ===== */

.feed-container {
    max-width: 800px;
    margin: 0 auto;
}

.feed-header {
    position: sticky;
    top: 80px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    z-index: 30;
}

/* ===== УВЕДОМЛЕНИЯ ===== */

.notification-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: var(--card-hover);
    transform: translateX(4px);
}

.notification-item.unread {
    border-left: 4px solid var(--accent-primary);
    background: var(--bg-surface);
}

/* ===== SETTINGS СТРАНИЦА ===== */

.settings-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--card-border);
}

.settings-item:last-child {
    border-bottom: none;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--input-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-switch.active {
    background: var(--accent-primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.toggle-switch.active::after {
    left: 28px;
}

/* ===== ONBOARDING ===== */

.onboarding-step {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.onboarding-illustration {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.8;
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.2s ease;
}

.progress-dot.active {
    background: var(--accent-primary);
    transform: scale(1.2);
}

/* ===== ERROR СТРАНИЦЫ ===== */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.error-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 48px 32px;
    max-width: 500px;
}

.error-code {
    font-size: 72px;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 18px;
}

/* ===== LOADING СОСТОЯНИЯ ===== */

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--card-border);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}