:root {
    --primary: #6c5ce7;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --text-color: #2d3436;
    --bg-color: #f5f6fa;
    --card-bg: white;
    --input-bg: #dee2e6;
    --border-color: #DFE6E9;
    --bg-secondary: #f5f5f5;
    --success: #00b894;
    --danger: #d63031;
    --text-light: #F5F6FA;
    --profit-color: #4CAF50;
    --loss-color: #F44336;
}

.logB {
    color: blue;
}
/* Колокольчик на главной (новости) */
.News {
        position: absolute;
        left: 36px;
        top: 32px;
        cursor: pointer;
    }
    .News i {
        font-size: 28px;
}
@media only screen and (max-width: 482px) {
    .News {
        left: 12px;
        top: 24px;
    }
    .News i {
        font-size: 20px;
    }
}
/* Стили для аналитики портфеля */
.analytics-container {
    max-width: 1200px;
    margin: 8px;
}

.analytics-header {
    text-align: center;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-height: 388px; /* Увеличиваем минимальную высоту */
    display: flex;
    flex-direction: column;
}

.sectors-list {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
}

.sector-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.sector-item:last-child {
    border-bottom: none;
}

.sector-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 15px;
}

.sector-info {
    flex-grow: 1;
}

.sector-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.sector-details {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9em;
}

.sector-percentage {
    font-weight: bold;
    color: var(--primary);
    margin-left: 15px;
}

.portfolio-summary {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
}

.summary-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.summary-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

.summary-label {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9em;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.back-button:hover {
    background: var(--secondary);
}

.back-button i {
    margin-right: 8px;
}
.empty-portfolio i {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--border-color);
}

#sectorChart {
    max-width: 100%;
    height: 350px !important;
    width: 200px;
}
.guide-menu {
   background: var(--card-bg);
}
.guide-answer {
    background: var(--card-bg);
}
.guide-menu-item:hover {
    background: #b7b0b0;
}
.quest-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.quest-modal-content {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}
.quest-modal-header {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: bold;
}

.quest-modal-header.success {
    color: var(--success);
}

.quest-modal-header.error {
    color: var(--danger);
}

.quest-modal-body {
    padding: 10px 0;
}

.quest-modal-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.quest-modal-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.quest-modal-button:hover {
    opacity: 0.9;
}

.quest-answer-info {
    background: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
}

.quest-answer-info p {
    margin: 5px 0;
    font-size: 0.95em;
}

.quest-answer-info strong {
    color: var(--primary);
}

/* Анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Адаптация для мобильных */
@media only screen and (max-width: 482px) {
    .quest-modal-content {
        width: 85%;
        padding: 15px;
    }
    
    .quest-modal-header {
        font-size: 1.3em;
    }
    
    .quest-modal-button {
        width: 100%;
        padding: 10px;
    }
}
.welcome {
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1;
    border: 1px solid rgba(108, 92, 231, 0.1);
}
.experience {
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    z-index: 1;
    border: 1px solid rgba(108, 92, 231, 0.1);
}
.guide-messages {
    background: white;
}
.theme-select {
    padding: 10px;
    border-radius: 40px;
    background: var(--input-bg);
    margin-bottom: 16px;
}
.tooltip-text {
    display: none;
    position: absolute;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    margin-top: 10px;
    width: max-content;
    max-width: 200px;
    color: #333;
}
.tooltip-text.show {
    display: block;
    top: 26px;
    right: 0;
}
.user-menu {
    display: none;
    position: absolute;
    right: 328px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 3;
    overflow: hidden;
}
/* Добавить в style.css */
.remember-me-container {
    margin: 15px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.custom-checkbox {
    position: absolute;
    opacity: 0;
}

.custom-checkbox + .remember-me-label .checkbox-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #4a90e2;
    border-radius: 3px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s;
}

.custom-checkbox:checked + .remember-me-label .checkbox-icon {
    background-color: #4a90e2;
    border-color: #4a90e2;
}

.custom-checkbox:checked + .remember-me-label .checkbox-icon::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.remember-me-text {
    user-select: none;
}

.remember-me-hint {
    font-size: 12px;
    color: #888;
    margin-left: 28px;
    display: flex;
    align-items: center;
}

.remember-me-hint i {
    margin-right: 5px;
}
/* Стили для гостевой страницы */
.guest-message {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.guest-buttons {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.guest-features {
    text-align: left;
    margin-top: 30px;
    padding: 20px;
    background: rgba(108, 92, 231, 0.05);
    border-radius: 10px;
}

.guest-features ul {
    padding-left: 20px;
}

.guest-features li {
    margin-bottom: 10px;
}

/* Адаптация для мобильных */

/* Стили для гостевого контейнера */
.guest-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    text-align: center;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.guest-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

.guest-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    text-align: left;
}

/* Адаптация для мобильных */
@media (max-width: 600px) {
    .guest-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 85%;
    }
}

.guest-message h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.guest-message p {
    margin-bottom: 25px;
    font-size: 18px;
}

.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.auth-btn {
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.auth-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.auth-btn.register-btn {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.features {
    text-align: left;
    margin-top: 40px;
}

.features h3 {
    color: var(--primary);
    margin-bottom: 15px;
    text-align: center;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.features i {
    margin-right: 10px;
    color: var(--secondary);
    font-size: 20px;
    width: 25px;
}
/* Стили для фонда */
.fond-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
}

.fond-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.fond-header {
    text-align: center;
    margin-bottom: 25px;
}

.fond-header h2 {
    color: var(--primary);
    margin: 0;
}

.fond-info {
    margin-bottom: 25px;
}

.fond-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.fond-row:last-child {
    border-bottom: none;
}

.fond-label {
    font-weight: 600;
    color: var(--dark);
}

.fond-value {
    font-weight: 600;
    color: var(--primary);
}

.fond-total {
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--success);
    padding: 15px;
    background: rgba(0, 184, 148, 0.1);
    border-radius: 8px;
    margin-top: 25px;
}

.fond-message {
    line-height: 1.6;
    margin-bottom: 25px;
}

.fond-message p {
    margin-bottom: 15px;
}

.fond-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}
.stocks-table tbody tr:hover {
        background-color: rgba(108, 92, 231, 0.1);
        cursor: pointer;
    }
    
    .sell-btn {
        background: linear-gradient(135deg, #ff7675, #d63031);
        color: white;
        border: none;
        padding: 5px 10px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.3s ease;
        margin-left: 10px;
    }
    
    .sell-btn:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }
    
    .action-cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .positive {
        color: var(--success);
    }
    
    .negative {
        color: var(--danger);
    }
.search-container {
    display: flex;
    justify-content: center; /* Центрирование по горизонтали */
    margin: 20px 0;
}
.friends-container {
    display: flex;
    flex-direction: row;
    width: 708px;
    margin: 20px auto;
    justify-content: space-between;
    align-items: center;
}
.friends-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0px;
    box-shadow: 0px 0px 12px 4px rgba(0, 0, 0, 0.5);
}
.user-balance {
    margin-left: 14px;
    margin-right: 14px;
            font-size: 0.9rem;
            color: #666;
}
.quest-container {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin: 20px auto;
            max-width: 600px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
        .quest-question {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 15px;
        }
        .quest-answer {
            background: #f5f5f5;
            border-radius: 5px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .quest-answer:hover {
            background: #e0e0e0;
        }
        .quest-submit {
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 5px;
            padding: 10px 20px;
            margin-top: 15px;
            cursor: pointer;
        }
        .quest-message {
            margin-top: 15px;
            padding: 10px;
            border-radius: 5px;
        }
        .quest-success {
            background: #d4edda;
            color: #155724;
        }
        .quest-error {
            background: #f8d7da;
            color: #721c24;
        }
        .hero {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: var(--text-light);
            padding: 1px 0;
            text-align: center;
            border-radius: 0 0 30px 30px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }

        .hero h1 {
            font-size: 2.8rem;
            margin: 0 0 15px 0;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        
        .login-form button[type="submit"] {
    display: block;
    margin: 20px auto; /* Автоматические отступы по бокам центрируют кнопку */
    width: 50%; /* Можно регулировать ширину */
    max-width: 200px; /* Максимальная ширина */
}

        .message {
            background: white;
            margin: 20px 0;
            padding: 15px;
            border-radius: 8px;
            font-weight: 500;
        }

        .error {
            background: rgba(214, 48, 49, 0.1);
            color: var(--danger);
            border-left: 4px solid var(--danger);
        }

        .success {
            background: rgba(0, 184, 148, 0.1);
            color: var(--success);
            border-left: 4px solid var(--success);
        }
.Welcome-text {
    font-size: 1.2rem;
}
.holiday-banner {
    display: none;
}
.close-sell {
    font-size: 1.5rem; 
    cursor: pointer;
    float: right;
}
.page-title {
    text-align: center;
    color: var(--dark);
    font-size: 2rem;
    margin-top: -24px;
    margin-bottom: 0;
}
.fond-title {
    text-align: center;
    color: var(--dark);
    font-size: 2rem;
    margin-top: 0px;
    margin-bottom: 0px;
}
.MainText {
    background: #6C5CE7;
    max-width: 44%;
    text-align: center;
    margin: 8px auto;
    padding: 4px;
    border-radius: 12px;
    color: #00E5DF;
}
.login-form {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0px 0px 12px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 400px; /* Фиксированная ширина для формы */
    width: 90%; /* Для адаптивности на маленьких экранах */
    margin-top: 4px;
    margin-bottom: 12px;
    color: var(--text-color);
}
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}
.message.error {
    margin:0;
    width: 90%;
    max-width: 400px;
    text-align: center;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}
.form-group input {
    width: 94%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s ease;
    background: var(--input-bg);
    color: var(--text-color);
}
.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}
.footer-link {
    text-align: center;
    background: white;
    padding: 8px;
}
.Hobbit {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50%; /* или любая нужная вам ширина */
    text-align: center;
}
.Hobbit-link {
    color: blue;
}
.footer-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.footer-link a:hover {
    color: var(--secondary);
    text-decoration: underline;
}
.fondC {
    height: calc(100vh - 120px); 
            width: 100%;
            flex: 1; /* Добавлено для растягивания на всю высоту */
            display: flex;
    flex-direction: row-reverse;
}

        .btn-submit {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            border: none;
            padding: 16px 0;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3);
            display: block;
            width: 43%;
            margin-top: 12px;
            margin-bottom: 12px;
        }

        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(108, 92, 231, 0.4);
            opacity: 0.95;
        }

        .hidden-radio {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }
        * {
            -webkit-tap-highlight-color: transparent; /* Для Safari и Chrome на iOS */
            -webkit-touch-callout: none;
            text-decoration: none;
            color: var(--text-color);
        }
        .container h1 {
            margin: 0 0 0 12px;
        }
        .container h2 {
            margin: 0 0 0 12px;
        }
        .container p {
            margin: 0 0 0 12px;
        }
        .welcome-divider {
            width: 100%;
            height: 1px;
            background: black;
            margin: 0;
            border: none;
        }
        .balance-tooltip {
            position: relative;
            display: inline-block;
            cursor: pointer;
        }
        
        .balance-tooltip .tooltip-text {
            visibility: hidden;
            width: 200px;
            background-color: #555;
            color: #fff;
            text-align: center;
            border-radius: 6px;
            padding: 5px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 14px;
        }
        
        .balance-tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }
        
        .balance-tooltip .tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #555 transparent transparent transparent;
        }
        
        
        /* Стили меню */
.menu {
    width: 228px;
    background-color: var(--card-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.menu-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-color);
    text-decoration: none;
    display: block;
}

.menu-item:hover {
    background-color: var(--bg-secondary);
}
        .card {
        width: auto;
        background: var(--card-bg);
        color: var(--text-color);
        border-radius: 8px;
    }
    .MyP {
        width: calc(100% - 188px); /* 228px + 40px отступ */
        background: white;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-left: 40px; /* Отступ между колонками */
    }
    .columns-containerS {
        margin-top: 8px;
        margin-bottom: 20px;
        margin-left: 0;
    }
    
    .first-column {
        width: 228px;
        display: block;
    }
    .settings-container {
            background: var(--card-bg);
            border-radius: 12px;
            padding: 20px;
            margin: 20px auto;
            max-width: 600px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            color: var(--text-color);
        }
    /* Стили для портфеля */

.portfolio-actions {
    margin-bottom: 15px;
}
.sell-btn  {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.portfolio-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.LogReg-btn {
    width: 180px; /* Фиксированная ширина */
    padding: 8px 0;
    text-align: center;
}

.portfolio-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: black;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group select {
    width: 96%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Стили для админ-кнопки */
.admin-link {
    background-color: var(--danger);
    color: white !important;
    margin-top: 10px;
    border-radius: 6px;
    text-align: center;
}

.admin-link:hover {
    background-color: #c0392b;
}

.admin-link i {
    margin-right: 8px;
}

/* Админ-панель */
.admin-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.admin-actions .portfolio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
}

.admin-actions .portfolio-btn i {
    margin-right: 10px;
    font-size: 1.2em;
}

.menu-item.active {
    background-color: var(--danger);
    color: white !important;
}
/* Стили для админ-панели акций */

.stocks-table th {
    background-color: #f8f8f8;
    font-weight: 600;
}

.price-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input {
    width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Стили для админ-таблицы */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.admin-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.inline-form {
    display: flex;
    gap: 5px;
    align-items: center;
}

.small-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.small-btn.block {
    background-color: #ff6b6b;
    color: white;
}

.small-btn.unblock {
    background-color: #51cf66;
    color: white;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
}
.back-button {
    margin-left: 8px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border: none;
            border-radius: 14px;
            width: 16px;
            height: 12px;
            display: flex;
            justify-content: flex-end;
            cursor: pointer;
            z-index: -1;
            box-shadow: 3px 3px 3px rgba(0, 10, 5, 0.7);
        }
        .back-button i {
            color: black;
            font-size: 24px;
        }
    .exit-btn {
        right: 24px;
        flex-direction: column;
        position: fixed;
        top: 28px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        border: none;
        border-radius: 40px;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1000;
        box-shadow: 3px 3px 3px rgba(0, 10, 5, 0.7);
    }
        /* Стили для переключателя режимов */
.mode-switcher {
    display: flex;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
    background: #f0f0f0;
}

.mode-btn {
    flex: 1;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-align: center;
}

.mode-btn.active {
    background: #4CAF50;
    color: white;
}
/* Стили для формы */
.small-info {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

#currentStockInfo {
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 5px;
}
.empty-portfolio {
    text-align: center;
    padding: 30px !important;
}
.empty-message {
    max-width: 300px;
    margin: 0 auto;
    text-align: center; /* Добавить эту строку */
}
.empty-message p {
    margin-bottom: 15px;
    font-size: 1.1em;
}
.secret {
    display: none;
}
.bonus-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 12px;
    max-width: 90%;
    margin-top: 28px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.bonus-title {
    color: var(--primary);
    margin-top: 0;
}
.bonus-message {
    color: black;
    margin-bottom: 20px;
}
.bonus-amount {
    font-size: 42px;
    font-weight: bold;
    color: var(--success);
}
.bonus-streak {
    font-size: 18px;
    color: var(--dark);
}
.streak-days {
    font-weight: bold;
    color: var(--primary);
}
.bonus-timer {
    font-size: 16px;
    color: var(--dark);
}
.bonus-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
}
        
        .bonus-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
            opacity: 0.95;
        }
        
        .bonus-button:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        
        .bonus-calendar {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 10px;
            margin-top: 30px;
        }
        
        .calendar-day {
            background: white;
            border-radius: 8px;
            padding: 10px;
            text-align: center;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .calendar-day.active {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
        }
        
        .calendar-day.future {
            opacity: 0.6;
        }
        
        .day-number {
            font-weight: bold;
            font-size: 18px;
            margin-bottom: 5px;
        }
        
        .day-amount {
            font-size: 12px;
        }
.bonus-container {
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
}
/* Стили для модального окна бонуса */
        .bonus-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.7);
        }
        
        .bonus-modal-content {
            background-color: #fefefe;
            margin: 10% auto;
            padding: 20px;
            border-radius: 12px;
            width: 68%;
            max-width: 500px;
            animation: modalFadeIn 0.3s;
        }
        
        @keyframes modalFadeIn {
            from {opacity: 0; transform: translateY(-50px);}
            to {opacity: 1; transform: translateY(0);}
        }
        
        .bonus-close {
            position: absolute;
            right: 20px;
            top: 4px;
            font-size: 40px;
            font-weight: bold;
            color: #aaa;
            cursor: pointer;
        }
        
        .bonus-close:hover {
            color: #000;
        }
.fond-sync-section {
    margin-top:12px;
    margin-left:24px;
}
/* Стили для публичной статистики фонда */
.fond-container-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fond-public-stats {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.08);
}

.fond-stats-header {
    text-align: center;
    margin-bottom: 30px;
}

.fond-title {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.fond-subtitle {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.1rem;
}

.fond-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.fond-stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
}

.fond-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(108, 92, 231, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.2rem;
}

.fond-stat-card h3 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}

.fond-big-number {
    font-size: 2.2em;
    font-weight: 700;
    margin: 10px 0;
    color: var(--text-color);
}

.stat-change {
    font-size: 1.1em;
    font-weight: 600;
    margin: 5px 0 0;
}

.stat-description {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.7;
    margin: 5px 0 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-period-selector {
    display: flex;
    gap: 10px;
}

.period-btn {
    background: rgba(108, 92, 231, 0.1);
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.period-btn.active {
    background: var(--primary);
    color: white;
}

.no-data-message {
    text-align: center;
    padding: 40px 0;
    color: var(--text-color);
    opacity: 0.6;
}

.no-data-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: rgba(108, 92, 231, 0.3);
}

.fond-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.1);
}

.fond-stat-card h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.fond-big-number {
    font-size: 2em;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

/* Стили для графика фонда */
.fond-chart-container {
    margin-top: 30px;
}

.chart-container {
    position: relative;
    height: 350px;
}

/* Стили для кнопки синхронизации */
#sync-tinkoff-btn {
    background: linear-gradient(135deg, #FF8C00, #FFA500);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
}

#sync-tinkoff-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

#sync-tinkoff-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Стили для сообщений */
#tinkoff-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

/* Стили для приглашения в фонд */
.fond-invitation {
    max-width: 600px;
    margin: 0 auto;
}

.fond-message {
    line-height: 1.7;
    color: var(--text-color);
}

.fond-message p {
    margin-bottom: 20px;
}

.fond-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

/* Адаптация для мобильных устройств */
@media only screen and (max-width: 768px) {
    .fond-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .fond-stat-card {
        padding: 15px;
    }
    
    .fond-big-number {
        font-size: 1.8em;
    }
    
    .chart-container {
        height: 250px;
    }
    
    #sync-tinkoff-btn {
        width: 100%;
        padding: 10px;
    }
    
    .fond-actions {
        flex-direction: column;
    }
    
    .fond-actions .portfolio-btn {
        width: 100%;
    }
}
                                             /* Мобилки */

@media only screen and (max-width: 482px) {
    
    .guest-message {
        padding: 20px;
        margin: 20px auto;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .auth-btn {
        width: 100%;
    }
    .level-tooltip .tooltip-text,
    .exp-tooltip .tooltip-text {
        max-width: 171%;
    }
    .user-menu {
        right: 0;
        top: 50px;
    }
    .guest-buttons {
        gap: 10px;
    }
body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
}
.T-btn {
    display: block;
    margin: 0 auto;
}
.fondC {
    height: calc(100vh - 120px); 
    flex: 1;
    flex-direction: column-reverse;
}
    .fond-sync-section {
    margin-top:12px;
    margin-left: 0;
}
.fond-container {
    width: 100%;
    max-width: 800px;
    margin: 0;
    padding: 0;
}
.fond-card {
    margin: 0;
    }
    
    .fond-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .fond-actions {
        width: 91%;
        flex-direction: column;
    }
    
    .fond-actions .portfolio-btn {
        width: 100%;
    }
.page-title {
    text-align: center;
    color: var(--dark);
    font-size: 2rem;
    margin-top: -24px;
    margin-bottom: 24px;
}
.fond-title {
    text-align: center;
    color: var(--dark);
    font-size: 2rem;
    margin-top: 0px;
    margin-bottom: 0px;
}
.message.error {
    margin-top:0;
    margin-bottom: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}
.friends-container {
    display: flex;
    flex-direction: column;
    width: 404px;
    margin: 12px auto;
    gap: 20px;
    align-items: normal;
}
.bonus-container {
    padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
}
.MainText {
    background: #6C5CE7;
    max-width: 88%;
    text-align: center;
    margin: 20px auto;
    padding: 8px;
    border-radius: 12px;
    color: #00E5DF;
}
.login-form {
        padding: 20px;
        width: 85%;
        position: relative; /* Изменено для мобилок */
        top: -40px;
        left: unset;
        transform: unset;
        margin: 20px auto; /* Центрирование блока */
}
    
    .messages {
        max-height: calc(100vh - 160px);
        padding: 8px;
    }
    
    .input-area {
        padding: 8px;
    }
    
    .message {
        max-width: 90%;
    }
.chat-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.search-btn {
    padding:8px;
}
.send-form {
   position: fixed;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%; /* или любая нужная вам ширина */
    text-align: center;
    z-index: 1000; 
}
.input-area {
    padding: 12px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 100;
}
.messages {
            padding: 8px;
            overflow-y: auto;
            display: flex;
            flex-direction: column-reverse;
            max-height:90%;
        }
.message {
            margin-bottom: 15px;
            padding: 12px 15px;
            border-radius: 12px;
            background: #e1e1e1;
            position: relative;
            max-width: 80%;
        }
.message.own {
            align-self: flex-end;
            background: rgba(108, 92, 231, 0.1);
            border: 2px solid rgb(0 0 255);;
}
    .welcome-divider {
        width: 100%;
        height: 1px;
        background: black;
        margin: 0;
        border: none;
        padding: 0;
        position: absolute;
        left:0 ;
    }
    
.name {    
    font-size: 20px;
}
    
    
    .tooltip-text {
        max-width: 171%;
    }
    
    .first-column {
        display: flex;
        flex-direction: column-reverse;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .menu {
        border-radius: 12px;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        flex-direction: row;
    }
    
    .menu-item {
        padding: 8px 0;
        margin: 4px;
        border-radius: 12px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        transition: all 0.3s ease;
        flex: 1 0 40%;
        text-align: center;
    }
    .card {
        margin-top: 4px;
        max-width: 72%;
    }
    
    /* Портфель */
    
    .calendar-container {
        margin: 0;
        padding: 0px;
        border-radius: 12px;
        box-shadow: none;
        margin-bottom: 32px;
        overflow-x: auto; /* Включаем горизонтальный скролл */
        -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
        scrollbar-width: thin; /* Для Firefox */
        padding-bottom: 15px; /* Место для скроллбара */
        width: 100%;
    }
    
    

    .stocks-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    .stocks-table th {
        padding:4px;
    }
    
    /* Модальное окно */
    .modal-content {
        width: 90%;
        margin: 20% auto;
        padding: 15px;
    }
    
    /* Формы */
.form-group input, 
.form-group select {
    width: 96%;
    padding: 10px;
    }
    
    /* Адаптация таблицы портфеля */
    .stocks-table {
        font-size: 14px;
    }
    
    /* Адаптация пустого портфеля */
    .empty-message {
        max-width: 100%;
    }
}
/* Анимация для мобильных кнопок */
@media (hover: none) {
    .portfolio-btn:active, 
    .empty-portfolio-btn:active {
        transform: scale(0.95);
    }
}


.level-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-weight: bold;
    color: var(--primary);
}

.level-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.level-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.level-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}


/* Стили для уведомления о повышении уровня */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 3000;
    text-align: center;
    animation: fadeIn 0.5s, pulse 1.5s infinite;
    border: 3px solid var(--accent);
}

.level-up-content h3 {
    margin-top: 0;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.level-up-content p {
    margin-bottom: 5px;
    font-size: 18px;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
}
/* Стили для ссылки "Забыли пароль?" */
.forgot-password-link {
    display: block;
    margin: 10px 0 15px;
    text-align: center;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.forgot-password-link:hover {
    color: var(--secondary);
    text-decoration: underline;
    transform: translateY(-1px);
}

.forgot-password-link:active {
    transform: scale(0.98);
}
