* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #10B981 #1F2937;
}
body {
    font-family: 'Inter', 'Arial', sans-serif;
    line-height: 1.6;
    color: #F9FAFB;
    background-color: #111827;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    min-height: 100dvh;
}
body.modal-open {
    overflow: hidden;
}
body.modal-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
header {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0; /* Уменьшено с 1rem для меньшей шапки */
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #10B981;
    flex-shrink: 0;
}
.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
    gap: 2rem;
    transition: transform 0.3s ease, opacity 0.3s ease; /* Плавная анимация */
    opacity: 0;
    transform: translateX(100%); /* Скрыто справа по умолчанию */
}
.main-menu li {
    margin: 0;
}
.main-menu li a {
    color: #F9FAFB;
    text-decoration: none;
    transition: color 0.3s;
}
.main-menu li a:hover {
    color: #7C3AED;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.auth-buttons {
    display: flex;
    gap: 0.5rem;
}
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #F9FAFB;
    cursor: pointer;
}
.main-menu.active {
    opacity: 1;
    transform: translateX(0); /* Slide-in слева */
}
.hero {
    background: linear-gradient(135deg, #1E3A8A, #7C3AED);
    height: 80dvh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 60px; /* Уменьшено с 80px для меньшей шапки */
    position: relative;
}
.hero-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 2; /* Предотвращаем перекрытие с фоном */
}
.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: color 0.3s;
}
.hero-content h1:hover {
    color: #F9FAFB;
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}
.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem; /* Уменьшено с 0.5rem для меньшего расстояния между кнопками */
    margin: 0 auto;
    max-width: 280px;
    position: relative;
    z-index: 2; /* Предотвращаем перекрытие */
}
.btn {
    background: #10B981;
    color: #F9FAFB;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: transform 0.3s, background 0.3s;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; /* Обеспечиваем полную ширину для предотвращения смещений */
    margin: 0; /* Убираем дефолтные маржины */
}
.btn:hover {
    background: #059669;
    transform: scale(1.05);
}
.btn-secondary {
    background: transparent;
    border: 2px solid #7C3AED;
    margin-left: 0.5rem;
    color: #F9FAFB;
    padding: 8px 16px;
    font-size: 0.9rem;
    min-height: 44px;
    width: 100%; /* Обеспечиваем полную ширину */
    margin: 0; /* Убираем дефолтные маржины */
    box-sizing: border-box;
}
.btn-secondary:hover {
    background: #7C3AED;
    border-color: #7C3AED;
    color: #F9FAFB;
}
.btn-edit {
    background: #7C3AED;
    color: #F9FAFB;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
    font-size: 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-edit:hover {
    background: #6D28D9;
}
.btn-delete {
    background: #EF4444;
    color: #F9FAFB;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 4px;
    font-size: 0.85rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-delete:hover {
    background: #DC2626;
}
.button-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 10px 0;
}
.button-group .btn,
.button-group .btn-secondary {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 36px;
    flex: 1;
    max-width: 200px;
}
.edit-input {
    padding: 5px;
    border: 1px solid #4B5563;
    background: #1F2937;
    color: #F9FAFB;
    border-radius: 5px;
    width: 80px;
    margin: 5px 0;
}
section {
    padding: 80px 0;
}
h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #F9FAFB;
}
.features {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 10px;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.feature {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}
.feature:hover {
    transform: translateY(-5px);
}
.feature i {
    font-size: 3rem;
    color: #10B981;
    margin-bottom: 1rem;
}
.portfolio-section, .ai-coach-section, .dashboard-section {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 0.5rem; /* Уменьшено с 2rem */
}
.add-asset-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    justify-content: center;
}
.add-asset-form input, .add-asset-form select {
    padding: 10px;
    border: 1px solid #4B5563;
    background: #1F2937;
    color: #F9FAFB;
    border-radius: 5px;
    min-width: 120px;
}
.add-asset-form button {
    padding: 10px 20px;
}
.portfolio-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.asset-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
    cursor: pointer;
}
.asset-header {
    cursor: pointer;
}
.asset-item h4 {
    color: #10B981;
    margin-bottom: 0.5rem;
}
.asset-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #F9FAFB;
}
.price-error {
    color: #EF4444;
    font-size: 0.9rem;
    margin-top: 5px;
}
.total-value {
    text-align: center;
    font-size: 2rem;
    color: #10B981;
    margin: 2rem 0;
}
/* Улучшенный чат: flex, sticky инпут, quick replies как sticky header */
.tab-content {
    display: flex;
    flex-direction: column;
    height: 100dvh; /* Full viewport для чата */
    min-height: 600px;
    transition: opacity 0.3s ease; /* Fade для табов */
}
.tab-content.fade-in {
    opacity: 1;
}
.tab-content:not(.active) {
    opacity: 0;
}
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px; /* Место для sticky инпута */
    max-height: 60dvh; /* Ограничение по высоте для скролла */
    background: #1F2937;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.quick-replies-wrapper {
    position: sticky;
    top: 0;
    background: rgba(31,41,55,0.8);
    padding: 0.5rem;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid #4B5563;
}
#quickRepliesContainerAnalysis,
#quickRepliesContainerCourses {
    position: static; /* Для десктопа */
}
.message {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
    max-width: 80%;
    word-wrap: break-word;
}
.message.user {
    background: #10B981;
    text-align: right;
    margin-left: auto;
    margin-right: 0;
    border-radius: 18px 18px 4px 18px;
}
.message.bot {
    background: rgba(255, 255, 255, 0.1);
    margin-left: 0;
    margin-right: auto;
    border-radius: 18px 18px 18px 4px;
    padding: 1rem;
}
.message.notification {
    background: #F59E0B;
    text-align: center;
    font-weight: bold;
    max-width: 100%;
    margin: 0 auto;
}
.chat-input {
    position: sticky;
    bottom: 0;
    background: rgba(31,41,55,0.95);
    padding: 1rem;
    gap: 1rem;
    z-index: 20;
    border-top: 1px solid #4B5563;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #4B5563;
    background: #1F2937;
    color: #F9FAFB;
    border-radius: 5px;
    min-height: 48px; /* Touch-friendly */
    height: auto;
    resize: vertical;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.4em;
    width: 100%; /* Full на мобильных */
    min-width: 200px; /* Min на десктопе */
}
.chat-input .btn {
    border-radius: 50%;
    width: 48px; /* Увеличено для touch */
    height: 48px;
    padding: 0;
    font-size: 0;
    min-height: 48px;
    flex-shrink: 0;
    background: #10B981;
    transition: transform 0.2s ease; /* Ripple */
}
.chat-input .btn:hover,
.chat-input .btn:active {
    transform: scale(1.05);
    background: #059669;
}
.chat-input .btn::before {
    content: '\f1d8'; /* Font Awesome paper-plane icon, adjust if different */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #F9FAFB;
    font-size: 1rem;
}
.chat-input .btn span {
    display: none; /* Hide any text label */
}
.chat-input .clear-chat-btn {
    background: transparent;
    border: 1px solid #6B7280;
    color: #9CA3AF;
    padding: 0;
    font-size: 1rem;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px; /* Touch-friendly */
    height: 48px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.chat-input .clear-chat-btn:hover {
    background: #6B7280;
    color: #F9FAFB;
    border-color: #6B7280;
    transform: scale(1.05);
}
.chat-input .clear-chat-btn i {
    font-size: 1rem;
}
/* Quick replies улучшения */
#quickRepliesContainerAnalysis .btn-secondary,
#quickRepliesContainerCourses .btn-secondary {
    min-width: 80px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    margin: 0 !important;
    transition: transform 0.2s ease; /* Ripple */
    tabindex: 0; /* Keyboard nav */
}
#quickRepliesContainerAnalysis .btn-secondary:hover,
#quickRepliesContainerCourses .btn-secondary:hover,
#quickRepliesContainerAnalysis .btn-secondary:focus,
#quickRepliesContainerCourses .btn-secondary:focus {
    transform: scale(1.05);
}
.ai-coach-section .tabs-container {
    display: flex;
    justify-content: space-between;
    background: #1F2937;
    overflow: hidden;
    margin-bottom: 0;
}
.ai-coach-section .tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}
.ai-coach-section .tab.active {
    background: #10B981;
    color: #111827;
    border-bottom-color: #059669;
    font-weight: bold;
}
.ai-coach-section .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #059669;
}
.ai-coach-section .tab-content {
    display: none;
    padding: 0;
    background: none;
    height: auto;
    min-height: auto;
    overflow: hidden;
}
.ai-coach-section .tab-content.active {
    display: flex;
    background: rgba(31, 41, 55, 0.5);
    padding: 2rem;
    min-height: 100dvh;
}
.courses-layout {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    height: 100%;
    position: relative;
}
.toggle-sidebar-btn {
    display: none; /* Только на мобильных */
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #10B981;
    border: none;
    color: #F9FAFB;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 15;
    transition: transform 0.3s;
}
.toggle-sidebar-btn:hover {
    transform: scale(1.1);
}
.courses-sidebar {
    width: calc(33% - 1rem);
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    height: fit-content;
    max-height: 500px;
    overflow-y: auto;
    transition: width 0.3s ease, max-height 0.3s ease;
}
.courses-sidebar.collapsed {
    width: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
}
.courses-sidebar h3 {
    margin-bottom: 1rem;
    color: #F9FAFB;
}
.accordion-item {
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    overflow: hidden;
    transition: background 0.3s ease;
}
.accordion-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.accordion-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: bold;
    color: #10B981;
    list-style: none;
    background: rgba(16, 185, 129, 0.1);
    transition: background 0.3s ease;
}
.accordion-item summary::-webkit-details-marker {
    display: none;
}
.accordion-item[open] summary {
    background: rgba(16, 185, 129, 0.2);
}
.subtopics {
    padding: 0 1rem 1rem;
    list-style: none;
}
.subtopics li {
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.subtopics li:hover {
    background: rgba(255, 255, 255, 0.05);
}
.subtopics li span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.sub-bullets {
    list-style: disc;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: #9CA3AF;
    margin-top: 0.5rem;
}
.courses-main {
    width: calc(67% - 1rem);
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 10px;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}
.courses-main .chat-container {
    max-width: none;
    width: 100%;
    height: auto; /* Flex-grow управляет */
}
.overall-progress {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    text-align: center;
}
.overall-progress span:first-child {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
.overall-progress span:last-child {
    display: block;
    margin-top: 0.5rem;
    color: #10B981;
    font-size: 0.9rem;
}
.courses-sidebar .progress-bar {
    height: 8px;
    background: #374151;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.25rem;
}
.courses-sidebar .progress-fill {
    height: 100%;
    background: #10B981;
    transition: width 0.3s ease;
}
.premium-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}
.premium-modal.active {
    opacity: 1;
    display: flex;
    pointer-events: auto;
}
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background: #1F2937;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    z-index: 2001;
    max-height: 90dvh;
    overflow-y: auto;
    width: auto;
    display: flex;
    flex-direction: column;
}
.premium-modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
    height: 90dvh;
}
.course-modal .modal-content {
    max-width: 600px;
    max-height: 80dvh;
    overflow-y: auto;
    text-align: left;
}
.course-modal h3 {
    color: #10B981;
    margin-bottom: 1rem;
    text-align: center;
}
.course-modal p {
    margin-bottom: 1rem;
}
.modal-content .btn,
.modal-content .btn-secondary {
    display: block;
    margin: 1rem auto 0;
    width: fit-content;
}
.how-it-works {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}
.step {
    width: 200px;
    text-align: center;
    margin: 1rem;
}
.step-number {
    background: #7C3AED;
    color: #F9FAFB;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: bold;
}
.testimonials {
    background: rgba(31, 41, 55, 0.5);
}
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}
.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
}
.testimonial cite {
    font-weight: bold;
    color: #10B981;
}
.cta {
    text-align: center;
    background: linear-gradient(135deg, #1E3A8A, #7C3AED);
}
.cta h2 {
    color: #F9FAFB;
}
footer {
    background: #1F2937;
    color: #F9FAFB;
    text-align: center;
    padding: 2rem 0;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #1F2937;
    flex-wrap: wrap;
}
.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #F9FAFB;
    flex: 0 0 auto;
}
.close-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: color 0.3s;
    flex: 0 0 auto;
    margin-left: auto;
}
.close-btn:hover {
    color: #EF4444;
}
.tabs-container {
    padding: 0 1rem;
    background: #1F2937;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    position: relative;
    z-index: 20;
}
.tabs {
    display: flex;
    justify-content: space-around;
    background: #1F2937;
    border-bottom: none;
    overflow-x: auto;
}
.tab {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
    min-height: 48px;
}
.tab.active {
    background: #10B981;
    color: #111827;
    font-weight: bold;
}
.tab-content {
    display: none;
    overflow-y: auto;
    padding: 2rem;
    background: rgba(31, 41, 55, 0.95);
    height: calc(100% - 80px) !important;
    min-height: 800px;
    min-height: 0;
    flex: 1;
}
.tab-content.active {
    display: block;
}
.tab-content:has([id^="tab-news"]) {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #10B981 #1F2937;
}
.tab-content:has([id^="tab-news"])::-webkit-scrollbar {
    width: 8px;
}
.tab-content:has([id^="tab-news"])::-webkit-scrollbar-track {
    background: #1F2937;
    border-radius: 4px;
}
.tab-content:has([id^="tab-news"])::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 4px;
}
.tab-content:has([id^="tab-news"])::-webkit-scrollbar-thumb:hover {
    background: #10B981;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem; /* Уменьшено с 1.5rem */
}
.metric-card {
    background: rgba(31, 41, 55, 0.8);
    padding: 0.5rem; /* Уменьшено с 2rem */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    position: relative;
}
.metric-card h4 {
    font-size: 0.8rem; /* Уменьшено с 1.1rem */
    color: #D1D5DB;
    margin-bottom: 0.5rem; /* Уменьшено */
    font-weight: 500;
}
.metric-value {
    font-size: 0.7rem; /* Уменьшено с 2rem */
    font-weight: bold;
    color: #FFFFFF; /* ФИКС: Улучшенный контраст */
    margin-bottom: 0.5rem; /* Уменьшено с 0.75rem */
    line-height: 1.2;
}
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Уменьшено с 0.75rem */
}
.progress-bar {
    height: 4px; /* Уменьшено с 12px */
    background: #374151;
    border-radius: 6px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    background: #F59E0B;
}
.progress-fill.oversold { background: #EF4444; }
.progress-fill.overbought { background: #10B981; }
.progress-fill.neutral { background: #F59E0B; }
.metric-tooltip {
    font-size: 0.7rem; /* Уменьшено с 0.9rem */
    color: #9CA3AF;
    display: block;
    margin-top: 0.3rem; /* Уменьшено */
    line-height: 1.4;
}
.rsi-tooltip, .metric-tooltip-popup {
    position: absolute;
    top: 50%;
    right: 110%;
    transform: translateY(-50%);
    background: #1F2937;
    color: #F9FAFB;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #4B5563;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    white-space: nowrap;
    font-size: 0.85rem;
    line-height: 1.4;
    z-index: 100;
    max-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    text-align: left;
}
.rsi-tooltip.active, .metric-tooltip-popup.active {
    opacity: 1;
    visibility: visible;
}
.rsi-tooltip h5, .metric-tooltip-popup h5 {
    color: #10B981;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
.rsi-tooltip p, .metric-tooltip-popup p {
    color: #D1D5DB;
    margin: 0;
    font-size: 0.8rem;
}
.rsi-tooltip .close, .metric-tooltip-popup .close {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 1rem;
    cursor: pointer;
}
.metrics-footer p {
    margin-bottom: 0.75rem;
    color: #F9FAFB;
}
.risk-note {
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #EF4444;
    font-size: 0.9rem;
    color: #FCA5A5;
}
.news-item,
.signal-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.news-item h5 {
    color: #F9FAFB;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.4;
}
.news-item h5 a {
    color: #10B981;
    text-decoration: none;
    transition: color 0.3s;
}
.news-item h5 a:hover {
    color: #059669;
}
.news-item small {
    color: #9CA3AF;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.sentiment {
    font-weight: bold;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-block;
}
.sentiment.positive { background: rgba(16, 185, 129, 0.25); color: #10B981; border: 1px solid #10B981; }
.sentiment.negative { background: rgba(239, 68, 68, 0.25); color: #EF4444; border: 1px solid #EF4444; }
.sentiment.neutral { background: rgba(245, 158, 11, 0.25); color: #F59E0B; border: 1px solid #F59E0B; }
.dashboard-section {
    background: rgba(31, 41, 55, 0.5);
}
#dashboardMetrics .metric-card {
    text-align: center;
}
.button-group {
    display: flex;
    gap: 3px; /* Уменьшено с 8px для дашборда */
    align-items: center;
    flex-wrap: wrap;
    margin: 5px 0; /* Уменьшено с 10px */
}
.button-group .btn,
.button-group .btn-secondary {
    padding: 2px 4px; /* Уменьшено с 6px 12px */
    font-size: 0.6rem; /* Уменьшено с 0.8rem */
    min-height: 24px; /* Уменьшено с 36px */
    flex: 1;
    max-width: 100px; /* Уменьшено с 200px */
}
.bottom-nav {
    display: none;
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 0;
    width: 100%;
    background: #1F2937;
    border-top: 1px solid #4B5563;
    z-index: 999;
    justify-content: space-around;
    padding: 0.5rem 0;
}
.bottom-nav .nav-item {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    transition: color 0.3s;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bottom-nav .nav-item.active {
    color: #10B981;
}
.forecast-content {
    display: flex;
    flex-direction: column;
    width: 90vw;
    max-width: 800px;
    height: 90dvh;
    max-height: 90dvh;
}
.modal-footer {
    position: sticky;
    bottom: 0;
    background: #1F2937;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    z-index: 10;
}
.modal-footer .btn {
    flex: 1;
    max-width: 150px;
    min-height: 48px;
}
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    color: #F59E0B;
    font-size: 1.2rem;
}
.loading-spinner i {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.asset-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}
.asset-buttons .btn,
.asset-buttons .btn-secondary {
    flex: 1;
    max-width: 120px;
    font-size: 0.85rem;
    padding: 0.5rem;
    min-height: 44px;
}
[data-aos] {
    transition-duration: 0.5s !important;
    will-change: transform;
}
.clear-chat-btn {
    background: transparent;
    border: 1px solid #6B7280;
    color: #9CA3AF;
    padding: 0;
    font-size: 1rem;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
}
.clear-chat-btn:hover {
    background: #6B7280;
    color: #F9FAFB;
    border-color: #6B7283;
}
.clear-chat-btn i {
    font-size: 1rem;
}
.ai-link {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #10B981;
    text-decoration: underline;
    cursor: pointer;
}
.ai-link:hover {
    color: #059669;
}
.ai-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    max-height: 400px;
    background: #1F2937;
    border: 1px solid #4B5563;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2002;
    overflow: hidden;
    transition: opacity 0.3s ease;
    opacity: 0;
    color: #F9FAFB;
    visibility: visible;
}
.ai-popup.active {
    opacity: 1;
}
.ai-popup-header {
    padding: 10px;
    background: rgba(31, 41, 55, 0.8);
    border-bottom: 1px solid #4B5563;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ai-popup-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #F9FAFB;
}
.ai-popup-body {
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
    background: rgba(31, 41, 55, 0.5);
    color: #F9FAFB;
}
.ai-popup-footer {
    padding: 5px 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.1);
}
.ai-popup {
    width: calc(100% - 40px);
    right: 20px;
    left: 20px;
    bottom: 10px;
    background: #1F2937;
}
.ai-popup-body {
    font-size: 1rem;
    max-height: 250px;
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #1F2937;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 4px;
    transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: #10B981;
}
::-webkit-scrollbar-thumb:active {
    background: #059669;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.chat-container::-webkit-scrollbar,
.tab-content::-webkit-scrollbar {
    width: 4px;
}
.expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out; /* ФИКС: Добавили padding transition для smoothness */
    background: rgba(31, 41, 55, 0.95);
    padding: 0; /* ФИКС: Убрали padding отсюда — теперь на inner */
}
.expandable.active {
    /* Убираем max-height: 500px; — пусть JS управляет */
    /* padding: 1rem; — уже в базовом */
}
.expandable-inner {
    padding: 1rem; /* ФИКС: Перенесли padding сюда — клиппинг работает идеально */
}
.asset-item .buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}
.asset-item.expanded .buttons {
    position: relative;
    bottom: 0;
}
.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}
.empty-state {
    color: #9CA3AF;
    text-align: center;
    padding: 2rem;
}
.analysis-buttons {
    display: none;
}
.tab-content#tab-analysis .analysis-buttons {
    display: block;
}
.tab-content .chat-container {
    width: 100%;
    max-width: none;
    margin: 0;
}
.tab-content .chat-input {
    width: 100%;
    justify-content: space-between;
}
.quiz-btn.small-btn {
    padding: 5px 10px;
    font-size: 0.8em;
    margin: 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #f0f0f0;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quiz-btn.small-btn:hover {
    background-color: #e0e0e0;
}
.quiz-btn.small-btn:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}
.bottom-nav {
    display: flex;
}
.hero {
    height: 70dvh;
    min-height: 400px;
    padding-top: 40px; /* Уменьшено с 60px для меньшей шапки */
}
.menu-toggle {
    display: block;
}
.nav-right {
    gap: 0.5rem;
}
.auth-buttons {
    display: flex;
    gap: 0.25rem;
}
.how-it-works {
    flex-direction: column;
    align-items: center;
}
.hero-content .btn,
.hero-content .btn-secondary {
    display: block;
    margin: 1rem auto;
    width: 100%;
    max-width: 280px;
}
.hero-content .btn-secondary {
    margin-left: 0;
}
.hero-buttons {
    gap: 0.125rem; /* Уменьшено еще больше для мобильных, с 0.1875rem */
}
.hero-buttons .btn,
.hero-buttons .btn-secondary {
    position: relative;
    z-index: 4; /* Убеждаемся, что кнопки поверх всего */
    margin-bottom: 0 !important; /* Полностью убираем нижние маржины */
}
.add-asset-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}
.add-asset-form input, .add-asset-form select {
    min-width: auto;
    flex-grow: 1;
}
.chat-input {
    flex-direction: column;
    gap: 0.5rem;
}
.chat-input input {
    width: 100%;
}
.modal-content {
    margin: 1rem;
    max-width: calc(100% - 2rem);
    padding: 1rem;
}
.course-modal .modal-content {
    max-width: 90vw;
    padding: 1rem;
}
.button-group {
    flex-direction: column;
    gap: 0.75rem;
}
.btn, .btn-secondary, .btn-edit, .btn-delete {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
}
.button-group .btn,
.button-group .btn-secondary {
    width: auto;
    min-height: 36px;
    font-size: 0.8rem;
    padding: 6px 12px;
}
.courses-layout {
    flex-direction: column;
    gap: 1rem;
    height: auto;
}
.courses-sidebar,
.courses-main {
    width: 100%;
    max-height: none;
    border-radius: 0;
}
.courses-sidebar {
    max-height: 300px; /* Collapsible на мобильных */
    overflow-y: auto;
    padding: 1rem;
    position: relative;
}
.toggle-sidebar-btn {
    display: block; /* Показать на мобильных */
}
.courses-main {
    min-height: 600px;
}
.subtopics li {
    padding: 0.75rem;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 0;
}
.sub-bullets {
    padding-left: 1rem;
    font-size: 0.85rem;
}
.accordion-item {
    border-radius: 0;
}
.ai-coach-section {
    background: transparent;
    border-radius: 0;
    padding: 1rem 0;
}
.ai-coach-section .tab-content.active {
    padding: 0;
    min-height: 100dvh; /* Full на мобильных */
    border-radius: 0;
    background: transparent;
    width: 100%;
    height: 100dvh;
}
.chat-container {
    height: auto !important; /* Flex управляет */
    max-height: 60dvh;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow-y: auto;
}
.message {
    background: none;
    border: none;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-radius: 0;
    max-width: 80%;
    word-wrap: break-word;
}
.message.user {
    background: #10B981;
    text-align: right;
    border-radius: 18px 18px 4px 18px;
    padding: 0.75rem;
    margin-left: auto;
    margin-right: 0;
}
.message.bot {
    color: #F9FAFB;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px 18px 18px 4px;
    padding: 0.75rem;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}
.chat-input {
    flex-direction: row;
    align-items: flex-end;
    gap: 1rem; /* Увеличено на мобильных */
    flex-wrap: wrap;
}
.chat-input input {
    width: auto;
    flex: 1;
    min-height: 48px;
    max-height: 120px;
}
.chat-input input:focus {
    outline: none;
}
.container {
    padding: 0 10px;
}
.hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}
.hero-content p {
    font-size: 1rem;
}
h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}
.feature-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}
.testimonial-grid {
    grid-template-columns: 1fr;
}
.portfolio-list {
    grid-template-columns: 1fr;
    gap: 1rem;
}
.asset-item {
    padding: 1rem;
}
.courses-sidebar {
    max-height: 300px;
}
.ai-coach-section .tab {
    min-width: 100px;
    font-size: 0.9rem;
}
#quickRepliesContainerAnalysis .btn-secondary,
#quickRepliesContainerCourses .btn-secondary {
    flex: 1 1 100%;
    min-width: auto;
}
.sub-bullets {
    font-size: 0.8rem;
    padding-left: 0.75rem;
}
.hero {
    height: 60dvh;
    min-height: 300px;
}
.chat-container {
    height: 400px !important;
}
.modal-content {
    max-height: 80dvh;
}
.ai-popup {
    width: 40vw;
    max-height: 60dvh;
}
.courses-sidebar {
    max-height: 300px;
}
.tab-content {
    min-height: 500px;
}
@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }
    .ai-coach-section .tab-content.active {
        height: auto;
        min-height: auto;
    }
    .hero-buttons {
        gap: 0.125rem; /* Уменьшено еще больше для мобильной версии, чтобы устранить большое расстояние */
    }
    /* Дополнительные фиксы для предотвращения перекрытий на мобильных */
    .hero-content {
        padding: 0 10px;
        z-index: 3; /* Повышаем z-index для контента */
    }
    .hero-buttons .btn,
    .hero-buttons .btn-secondary {
        position: relative;
        z-index: 4; /* Убеждаемся, что кнопки поверх всего */
        margin-bottom: 0 !important; /* Полностью убираем нижние маржины */
    }
    .main-menu {
        /* Компактный sidebar справа: всегда display:flex для плавной анимации */
        display: flex;
        visibility: hidden; /* Скрытие вместо display:none */
        flex-direction: column;
        position: fixed; /* Fixed для overlay */
        top: 0; /* От верха экрана */
        right: 0; /* Справа */
        width: 70%; /* Компактно: 70% ширины (не весь экран) */
        height: 100dvh; /* Полная высота */
        background: rgba(17, 24, 39, 0.95); /* Полупрозрачный фон */
        backdrop-filter: blur(10px);
        padding: 1rem 0;
        z-index: 1001; /* Выше хедера */
        justify-content: flex-start; /* Вертикально сверху */
        gap: 0; /* Убираем gap между li */
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3); /* Тень слева для глубины */
    }

    .main-menu.active {
        visibility: visible; /* Показываем плавно */
        opacity: 1;
        transform: translateX(0);
    }

    .main-menu li {
        margin: 0.5rem 1.5rem; /* Компактные отступы */
        text-align: left; /* Выравнивание влево */
        width: auto; /* Не full-width */
    }

    .main-menu li a {
        font-size: 1.1rem; /* Чуть меньше для компактности */
        padding: 0.5rem 0; /* Вертикальные отступы */
        display: block; /* Блочный для кликабельности */
    }

    /* Overlay для клика вне (прозрачный фон за меню) */
    body.menu-open {
        overflow: hidden; /* Блокируем скролл тела */
    }

    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5); /* Полупрозрачный overlay */
        z-index: 1000; /* Ниже меню */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    body.menu-open::before {
        opacity: 1; /* Показываем overlay плавно (без .active на ::before) */
    }

    .main-menu {
        justify-content: flex-start;
        padding: 1rem 20px;
    }
    .main-menu li {
        width: 100%;
        text-align: left;
    }
    .auth-buttons .btn,
    .auth-buttons .btn-secondary {
        font-size: 0.85rem;
        padding: 6px 12px;
        min-height: 40px;
    }
}

/* Десктоп: Убедимся, что меню горизонтальное и без бургера */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important; /* Жестко скрываем бургер */
    }
    .main-menu {
        display: flex !important; /* Всегда горизонтальное */
        position: static; /* Не absolute/fixed */
        width: auto;
        height: auto;
        background: transparent;
        flex-direction: row;
        gap: 2rem; /* Горизонтальные отступы */
        justify-content: center;
        opacity: 1;
        transform: none; /* Отключаем анимацию на десктопе */
        visibility: visible;
    }
    .main-menu li {
        margin: 0;
    }
}

.expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out; /* ФИКС: Добавили padding transition для smoothness */
    background: rgba(31, 41, 55, 0.95);
    padding: 0; /* ФИКС: Убрали padding отсюда — теперь на inner */
}

.expandable-inner {
    padding: 1rem; /* ФИКС: Перенесли padding сюда — клиппинг работает идеально */
}

.tab-content {
    display: none;
    overflow-y: auto;
    padding: 2rem;
    background: rgba(31, 41, 55, 0.95);
    height: calc(100% - 80px) !important;
    min-height: 0; /* ФИКС: Убрали дубли, оставили только это */
    flex: 1;
}

/* Новый: Стили для дашборда (гибридный обзор + детали) */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}
.allocation-pie {
    position: relative;
    height: 250px;
    margin: 1rem 0;
}
.ticker-tabs {
    margin: 2rem 0;
}
.ticker-tabs h3 {
    text-align: center;
    margin-bottom: 1rem;
}
.tabs-nav {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tabs-nav::-webkit-scrollbar {
    display: none;
}
.tab-ticker {
    flex: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #F9FAFB;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    min-height: 44px;
}
.tab-ticker.active,
.tab-ticker:hover {
    background: #10B981;
    color: #111827;
}
#tickerDetail {
    position: relative;
    height: 400px;
    margin-top: 1rem;
}
#tickerDetail canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ФИКС: Loading spinner для графиков */
.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F59E0B;
    font-size: 1.2rem;
    z-index: 10;
}

/* Responsive для дашборда */
@media (max-width: 768px) {
    .chart-container,
    .allocation-pie {
        height: 250px !important;
    }
    .ticker-tabs .tabs-nav {
        flex-direction: column;
        gap: 0.25rem;
    }
    .tab-ticker {
        width: 100%;
        text-align: center;
        height: 50px; /* ФИКС: Увеличен тач-таргет */
    }
    #tickerDetail {
        height: 300px;
    }
    /* ФИКС: Stack vertically, no horizontal scroll + улучшенный grid */
    .metrics-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem; /* Больше пространства на mobile */
    }
    .metric-card {
        padding: 1rem; /* Больше padding для читаемости */
    }
    .metric-value {
        font-size: 1rem; /* Увеличен шрифт на mobile */
    }
}

/* Доступность: ARIA и контраст */
.chart-container,
.allocation-pie,
#tickerDetail {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}
.chart-container[aria-label],
canvas[aria-label] {
    outline: 2px solid #10B981;
    outline-offset: 2px;
}
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111827; /* Уже тёмный, но подтверждаем */
    }
    /* High contrast */
    .metric-value {
        color: #FFFFFF; /* WCAG AA compliant */
    }
}

#dashboard {
    display: none; /* Начальное скрытие, JS переопределит */
}
.chart-container, .allocation-pie, #tickerDetail {
    display: block !important;
    visibility: visible !important;
    height: 300px !important;  /* Фикс высоты для canvas */
    position: relative;
}
.chart-container canvas, .allocation-pie canvas, #tickerChart {
    width: 100% !important;
    height: 100% !important;
    max-height: 300px;
}
.ticker-tabs {
    display: block !important;  /* Показать табы */
}
.tabs-nav {
    display: flex !important;
}
.tab-ticker {
    flex: 1;
    min-width: 100px;
}
@media (max-width: 768px) {
    .chart-container, .allocation-pie {
        height: 250px !important;
    }
}

#portfolioOverview, #allocationPie, #tickerChart {
    display: block !important;
    width: 100% !important;
    height: 300px !important;
    visibility: visible !important;
}
.chart-container, .allocation-pie {
    height: 300px !important;
}

/* Стили для кнопки Google Sign-In (официальный вид) */
.google-signin-btn {
    position: relative;
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid #c1c1c1 !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
    cursor: pointer !important;
    font-family: "Roboto", "Arial", sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    height: 42px !important;
    letter-spacing: 0.25px !important;
    line-height: 1.33 !important;
    margin: 0 !important;
    outline: none !important;
    overflow: hidden !important;
    padding: 0 16px !important;
    text-align: center !important;
    transition: box-shadow 0.3s cubic-bezier(0.00000, 0.00000, 0.2, 1), background-color 0.3s cubic-bezier(0.00000, 0.00000, 0.2, 1) !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
}

.google-signin-btn:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    background-color: #f8f8f8 !important;
}

.google-signin-btn:active {
    background-color: #f1f1f1 !important;
}

.google-signin-btn .google-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

.google-signin-btn .google-icon svg {
    fill: #4285f4;
    width: 18px;
    height: 18px;
}

.auth-providers {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Одинаковое расстояние (1rem) между всеми тремя элементами: Google, TG, VK */
    margin-bottom: 1.5rem; /* Отступ после блока провайдеров до текста "Или по email" */
}

.auth-providers .google-signin-btn,
.auth-providers .auth-widget {
    width: 100%;
    margin: 0; /* Убираем индивидуальные margin-bottom, теперь gap управляет расстоянием */
    min-height: 48px; /* Минимальная высота для единообразия (TG и VK виджеты адаптируются) */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-providers .auth-widget {
    /* Специфично для контейнеров TG и VK: они центрируют виджет внутри */
    position: relative;
}

/* На мобильных: сохраняем gap, но уменьшаем для компактности */
@media (max-width: 768px) {
    .auth-providers {
        gap: 0.75rem; /* Чуть меньше на мобильных, но всё равно равномерно */
    }
    
    .auth-providers .google-signin-btn,
    .auth-providers .auth-widget {
        min-height: 44px; /* Touch-friendly */
    }
}