/* Основные стили */
:root {
    --black: #000000;
    --dark-gray: #16181c;
    --gray: #2f3336;
    --light-gray: #71767b;
    --white: #ffffff;
    --blue: #1d9bf0;
    --blue-hover: #1a8cd8;
    --green: #00ba7c;
    --purple: #8B5CF6;
    --secondary-bg: #1e1e2d;
    --text-primary: #ffffff;
    --border-color: #2d3436;
    --success-color: #00b894;
    --error-color: #e17055;
    --info-color: #a5b1c2;
    --primary-bg: #121826;
    --secondary-bg: #1E293B;
    --card-bg: #1E293B;
    --text-secondary: #94A3B8;
    --red: #EF4444;
    --yellow: #F59E0B;
    --orange: #F97316;
    --light-blue: #60A5FA;
    --beige: #D1B086;
}

body {
    font-family: "TwitterChirp", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--black);
    color: var(--white);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Контейнеры */
.dashboard-container, 
.login-container, 
.register-container, 
.settings-container, 
.subscription-container,
.welcome-container,
.x-style-container,
.admin-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

.subscription-container,
.admin-container {
    max-width: 1200px;
}

.x-style-container {
    max-width: 800px;
}

.welcome-container {
    max-width: 900px;
}

/* Dashboard specific containers */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3px;
}

/* Header Section */
.header-section {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    margin-bottom: 3px;
}

.user-info {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.user-email {
    font-weight: 600;
    color: var(--blue);
    margin-left: 8px;
}

.logout-btn {
    background-color: var(--red);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background-color: #DC2626;
}

/* Subscription Card */
.subscription-card {
    grid-column: 1 / -1;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 10px 15px;
    border-left: 4px solid var(--green);
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.subscription-card.expired {
    border-left-color: var(--red);
}

.subscription-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.detail-label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-right: 5px;
}

.detail-value {
    font-size: 10px;
    font-weight: 500;
}

.progress-container {
    grid-column: span 4;
    margin-top: 5px;
}

.progress-bar {
    height: 4px;
    background-color: #334155;
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--green);
}

.progress-text {
    font-size: 8px;
    color: var(--text-secondary);
    margin-top: 2px;
    text-align: right;
}

/* Parameters Container */
.parameters-container {
    grid-column: 1 / -1;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 10px;
    height: 100px;
}

.parameters-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--secondary-bg);
    margin-bottom: 8px;
    padding-left: 5px;
}

.parameters-grid {
    display: flex;
    height: 50px;
    gap: 3px;
}

.parameter-card {
    flex: 1;
    background-color: var(--primary-bg);
    border-radius: 6px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 70px;
    min-width: 0;
}

.parameter-icon {
    font-size: 12px;
    margin-bottom: 3px;
}

.parameter-title {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.parameter-value {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.parameter-change {
    font-size: 10px;
    margin-top: 2px;
}

.positive {
    color: var(--green);
}

.negative {
    color: var(--red);
}

/* Chart Section */
.chart-section {
    grid-column: span 12;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 3px;
}

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

.chart-title {
    font-size: 14px;
    font-weight: 600;
}

.chart-container {
    height: 250px;
    position: relative;
}

/* Recent Trades */
.trades-section {
    grid-column: span 12;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.trades-container {
    max-height: 300px;
    overflow-y: auto;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.trades-table th {
    text-align: left;
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--card-bg);
}

.trades-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.trade-profit {
    font-weight: 500;
}

.profit-positive {
    color: var(--green);
}

.profit-negative {
    color: var(--red);
}

/* Bot Controls */
.controls-section {
    grid-column: span 12;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-active {
    background-color: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.status-inactive {
    background-color: var(--red);
    box-shadow: 0 0 8px var(--red);
}

.status-text {
    font-weight: 500;
    font-size: 12px;
}

.control-buttons {
    display: flex;
    gap: 8px;
}

.control-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 11px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.control-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
}

.start-btn {
    background-color: var(--green);
    color: white;
}

.start-btn:hover:not(:disabled) {
    background-color: #059669;
}

.stop-btn {
    background-color: var(--red);
    color: white;
}

.stop-btn:hover:not(:disabled) {
    background-color: #DC2626;
}

.settings-btn {
    background-color: var(--light-blue);
    color: white;
}

.settings-btn:hover {
    background-color: #3B82F6;
}

.instruction-btn {
    background-color: var(--orange);
    color: white;
}

.instruction-btn:hover {
    background-color: #EA580C;
}

.subscribe-btn {
    background-color: var(--beige);
    color: black;
}

.subscribe-btn:hover {
    background-color: #C19A6B;
}

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

.bot-notice {
    font-size: 9px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
    grid-column: 1 / -1;
}

/* Logs Section */
.logs-section {
    grid-column: span 12;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    height: 430px;
}

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

.logs-container {
    height: 320px;
    overflow-y: auto;
    background-color: #0F172A;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.log-entry {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.4;
}

.log-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.log-timestamp {
    color: var(--text-secondary);
}

.log-message {
    color: var(--text-primary);
}

.log-success {
    color: var(--green);
}

.log-error {
    color: var(--red);
}

.log-warning {
    color: var(--yellow);
}

.log-info {
    color: #FFFACD;
}

/* Dashboard Header */
.dashboard-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 3px;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% auto;
    color: #8B5CF6;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

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

/* Заголовки */
h1, h2, h3 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 20px;
}

h1 {
    font-size: 20px;
}

.x-main-header {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--white);
    margin: 0;
    padding: 0;
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Формы */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    color: var(--white);
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
.form-control,
.admin-key-input {
    background-color: var(--dark-gray);
    border: 1px solid var(--gray);
    border-radius: 4px;
    padding: 12px;
    color: var(--white);
    font-size: 15px;
    transition: border-color 0.3s;
}

.admin-key-input {
    padding: 12px 15px;
    margin-right: 10px;
    width: 300px;
    font-size: 16px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
.form-control:focus,
.admin-key-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

/* Кнопки */
.btn,
.x-button,
.auth-button,
.admin-key-submit {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    border: none;
    font-size: 15px;
    text-decoration: none;
}

.admin-key-submit {
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
}

.btn.primary,
.x-login-button {
    background-color: var(--blue);
    color: var(--white);
}

.btn.primary:hover,
.x-login-button:hover {
    background-color: var(--blue-hover);
}

.btn.danger,
.btn-stop,
.btn-danger {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--gray);
}

.btn.danger:hover,
.btn-stop:hover,
.btn-danger:hover {
    background-color: rgba(244, 33, 46, 0.1);
    border-color: rgb(244, 33, 46);
}

.btn-start {
    background: var(--success-color);
    color: white;
}

.btn-start:hover:not(:disabled) {
    background: #00a884;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-start:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary,
.admin-key-submit {
    background: #6c5ce7;
    color: white;
}

.btn-primary:hover,
.admin-key-submit:hover {
    background: #5649be;
}

.login-button {
    background-color: #6c5ce7;
    color: white;
}

.login-button:hover {
    background-color: #5649be;
    transform: translateY(-2px);
}

.register-button {
    background-color: var(--success-color);
    color: white;
}

.register-button:hover {
    background-color: #00a884;
    transform: translateY(-2px);
}

.x-register-button {
    background-color: var(--white);
    color: var(--black);
    border: 1px solid #cfd9de;
}

.x-register-button:hover {
    background-color: #f7f9f9;
}

/* Карточки */
.stat-card {
    background-color: var(--dark-gray);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    min-width: 200px;
    flex: 1;
}

.stat-card h3 {
    color: var(--light-gray);
    font-size: 15px;
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.stat-title {
    color: var(--info-color);
    font-size: 16px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
}

.plan-card {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s;
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-card.free-plan {
    border: 2px solid #28a745;
}

.step,
.x-step {
    background-color: var(--secondary-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #6c5ce7;
}

.x-step {
    background-color: #f7f9f9;
}

.step h3,
.x-step h3 {
    color: #6c5ce7;
    margin-top: 0;
    font-size: 18px;
}

.x-step h3 {
    color: #000;
}

/* График */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
}

.period-select {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
}

.period-select:focus {
    outline: none;
    border-color: var(--blue);
}

canvas {
    width: 100% !important;
    height: 300px !important;
}

/* Навигация */
.navigation {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.x-auth-buttons,
.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab.active {
    border-bottom: 2px solid #6c5ce7;
    color: #6c5ce7;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Ссылки */
a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.footer a,
.x-footer a {
    color: #a5b1c2;
    text-decoration: none;
}

.footer a:hover,
.x-footer a:hover {
    color: #6c5ce7;
    text-decoration: underline;
}

.x-footer a {
    color: #1d9bf0;
}

/* Flash-сообщения */
.flash-messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.flash-messages li {
    background-color: var(--dark-gray);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 8px;
    color: var(--white);
}

.alert,
.key-error {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 14px;
}

.key-error {
    color: var(--error-color);
    margin-top: 15px;
}

.alert-error {
    background: rgba(225, 112, 85, 0.2);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.alert-success {
    background: rgba(0, 184, 148, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

/* Специальные контейнеры */
.oval-header-container {
    background-color: var(--secondary-bg);
    border-radius: 50px;
    padding: 25px 40px;
    margin-bottom: 30px;
    text-align: center;
    border: 2px solid #6c5ce7;
}

.x-header-container {
    background-color: var(--black);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.x-content {
    background-color: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #0f1419;
}

.admin-key-form {
    background: var(--secondary-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    max-width: 600px;
    margin: 30px auto;
}

/* Списки */
.features-list,
.x-features-list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

.features-list li,
.x-features-list li {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    font-size: 16px;
}

.x-features-list li {
    line-height: 1.5;
}

/* Подписка */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.plan-price {
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0;
    color: var(--white);
}

.plan-features ul {
    padding-left: 20px;
    margin: 15px 0;
}

.plan-features li {
    margin-bottom: 8px;
}

.subscription-info {
    margin: 20px 0;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 5px;
    color: #28a745;
    font-size: 14px;
    text-align: center;
}

.subscription-expired {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

.subscription-active {
    color: var(--success-color);
}

.subscription-inactive {
    color: var(--error-color);
}

.plan-duration {
    color: var(--light-gray);
    font-size: 14px;
    margin: 10px 0;
    text-align: center;
}

.subscription-status {
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
}

.status-active {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
}

.status-inactive {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
}

/* Призыв к действию */
.call-to-action,
.x-call-to-action {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 30px 0;
    color: var(--success-color);
}

.x-call-to-action {
    color: #1d9bf0;
}

/* Футер */
.footer,
.x-footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    background-color: var(--secondary-bg);
    color: #a5b1c2;
    font-size: 14px;
    border-radius: 10px;
}

.x-footer {
    background-color: transparent;
    color: #536471;
}

/* Логи бота */
.log-container {
    margin-top: 20px;
    background: var(--secondary-bg);
    border-radius: 10px;
    padding: 20px;
    color: var(--white);
    height: auto;
    min-height: 300px;
}

.log-content {
    height: calc(100% - 40px);
    max-height: 600px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 13px;
    background: var(--black);
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    line-height: 1.4;
}

.log-success {
    color: var(--success-color);
    font-weight: bold;
}

.log-error {
    color: var(--error-color);
    font-weight: bold;
}

.log-warning {
    color: #fdcb6e;
}

.log-stop {
    color: var(--error-color);
    font-weight: bold;
}

/* Индикатор силы пароля */
.password-strength {
    margin-top: 10px;
    height: 5px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.strength-weak {
    background: var(--error-color);
    width: 33%;
}

.strength-medium {
    background: #fdcb6e;
    width: 66%;
}

.strength-strong {
    background: var(--success-color);
    width: 100%;
}

/* Индикатор активности бота */
.bot-status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    z-index: 1000;
}

.bot-status-active {
    background-color: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.bot-status-inactive {
    background-color: var(--error-color);
    box-shadow: 0 0 10px var(--error-color);
}

/* Matrix эффекты */
.matrix-text {
    font-family: 'Courier New', monospace;
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
    letter-spacing: 1px;
    position: relative;
    animation: matrixGlow 2s ease-in-out infinite alternate;
}

.user-email {
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
    animation: emailPulse 3s ease-in-out infinite;
}

.total-profit {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.stat-value[style*="color: #00ff41"] {
    color: #00ff41 !important;
    text-shadow: 0 0 5px #00ff41;
}

@keyframes matrixGlow {
    0% {
        text-shadow: 0 0 5px #00ff41, 0 0 10px #00ff41;
    }
    100% {
        text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41, 0 0 30px #00ff41;
    }
}

@keyframes emailPulse {
    0% {
        opacity: 0.7;
        text-shadow: 0 0 5px #00ff41;
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 15px #00ff41, 0 0 20px #00ff41;
    }
    100% {
        opacity: 0.7;
        text-shadow: 0 0 5px #00ff41;
    }
}

@keyframes fadeIn {
    from { opacity: 0; top: 0; }
    to { opacity: 1; top: 20px; }
}

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

/* Сетки */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Таблицы */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
}

.users-table th, 
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    background: var(--border-color);
    color: var(--info-color);
    font-weight: 600;
}

.users-table tr:hover {
    background: var(--border-color);
}

.trades-table th, 
.trades-table td {
    padding: 8px;
    font-size: 9px;
}

.trades-table td {
    text-align: center;
}

.trades-table td:last-child {
    text-align: right;
    padding-right: 15px;
}

/* Скрываем кнопки по умолчанию */
a[href="/stop_bot"],
a[href="/start_bot"] {
    display: none;
}

/* Показываем только активную кнопку */
.actions a {
    display: inline-block;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dashboard-container, 
    .login-container, 
    .register-container, 
    .settings-container, 
    .subscription-container,
    .welcome-container,
    .x-style-container,
    .admin-container {
        padding: 16px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .x-main-header {
        font-size: 24px;
    }
    
    .x-auth-buttons,
    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .x-button,
    .auth-button {
        width: 100%;
        max-width: 300px;
    }
    
    .oval-header-container h1 {
        font-size: 22px;
    }
    
    .auth-button {
        width: 100%;
        max-width: 250px;
        margin-bottom: 10px;
    }
    
    body {
        font-size: 14px;
        padding: 10px;
    }
    
    .header-section, 
    .welcome-card, 
    .instructions-card,
    .chart-section,
    .trades-section,
    .controls-section,
    .logs-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .btn, .control-btn, .auth-btn {
        padding: 12px 15px;
        min-width: 120px;
    }
    
    input, select, textarea {
        font-size: 16px;
        padding: 12px;
    }
    
    .control-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    .control-btn {
        width: 80px;
        height: 24px;
    }
    
    .trades-table,
    .users-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .trades-table th, 
    .trades-table td,
    .users-table th,
    .users-table td {
        font-size: 8px;
        padding: 6px 4px;
    }
    
    .admin-key-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .admin-key-form {
        margin: 20px auto;
        padding: 15px;
    }
    
    /* Mobile-specific styles */
    .dashboard-container {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .header-section,
    .subscription-card,
    .parameters-container,
    .chart-section,
    .trades-section,
    .controls-section,
    .logs-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
        grid-column: 1 / -1;
    }

    .header-section {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        margin-bottom: 10px;
    }

    .user-info {
        width: 100%;
        margin-bottom: 10px;
    }

    .subscription-card {
        height: auto;
        padding: 15px;
    }

    .subscription-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .progress-container {
        grid-column: 1;
    }

    .parameters-container {
        height: auto;
        padding: 15px;
    }

    .parameters-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        height: auto;
        gap: 8px;
    }

    .parameter-card {
        height: 80px;
        padding: 8px;
    }

    .parameter-icon {
        font-size: 14px;
    }

    .parameter-title {
        font-size: 11px;
    }

    .parameter-value {
        font-size: 12px;
    }

    .chart-section {
        padding: 15px;
    }

    .chart-container {
        height: 250px;
    }

    .trades-section {
        padding: 15px;
    }

    .trades-table {
        font-size: 11px;
    }

    .controls-section {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .control-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .control-btn {
        width: 100%;
        height: 40px;
        padding: 0;
        font-size: 12px;
        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 120px;
    }

    .bot-notice {
        margin-top: 10px;
        font-size: 10px;
    }
    
    .trades-table th, 
    .trades-table td {
        padding: 8px;
        border: 1px solid var(--border-color);
        text-align: left;
        font-size: 11px;
    }

    .trades-table th:nth-child(4),
    .trades-table td:nth-child(4) {
        text-align: right;
    }

    .trades-table td:nth-child(3) {
        text-align: right;
    }

    .trades-table td:nth-child(5) {
        text-align: right;
    }
}

@media (max-width: 700px) {
    .x-button {
        width: 100%;
        max-width: 300px;
    }
    
    .trades-table {
        font-size: 10px;
    }
    
    .trades-table th, 
    .trades-table td {
        padding: 6px 3px;
    }
    
    .trades-table th:nth-child(1),
    .trades-table td:nth-child(1) {
        white-space: nowrap;
    }
}

/* Desktop-specific adjustments */
@media only screen and (min-width: 769px) {
    .dashboard-container {
        grid-template-columns: repeat(12, 1fr);
    }

    .header-section {
        grid-column: 1 / -1;
        flex-direction: row;
    }

    .subscription-card {
        grid-column: 1 / -1;
    }

    .parameters-container {
        grid-column: 1 / -1;
    }

    .chart-section {
        grid-column: span 12;
    }

    .trades-section {
        grid-column: span 12;
    }

    .controls-section {
        grid-column: span 12;
        flex-direction: row;
    }

    .logs-section {
        grid-column: span 12;
        height: 480px;
    }

    .logs-container {
        height: 420px;
    }

    .control-btn {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Общий стиль для всех секций */
.chart-section,
.trades-section,
.controls-section,
.logs-section {
    margin-bottom: 3px;
}

/* Убираем лишний отступ у последней секции */
.logs-section {
    margin-bottom: 0;
}

/* Новые стили из index.html */
.param-title {
    color: #1e90ff; /* Светло-синий цвет */
    font-weight: bold; /* Жирный шрифт */
    cursor: pointer;
}

:root {
    --primary-bg: #121826;
    --secondary-bg: #1E293B;
    --card-bg: #1E293B;
    --border-color: #2D3748;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --green: #10B981;
    --red: #EF4444;
    --blue: #3B82F6;
    --purple: #8B5CF6;
    --yellow: #F59E0B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.dashboard-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Header Section */
.header-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: var(--secondary-bg);
    border-radius: 10px;
    margin-bottom: 10px;
}

.dashboard-header {
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
    margin: 0 auto;
    padding: 10px 0;
}

.dashboard-btn {
    background-color: var(--purple);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    width: auto;
    text-align: center;
    font-size: 15px;
    margin-top: 10px;
}

/* Welcome Card */
.welcome-card {
    width: 100%;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.welcome-title {
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.welcome-text {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Instructions Card */
.instructions-card {
    width: 100%;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
}

.instructions-title {
    font-size: 24px;
    font-weight: 600;
    color: #F5F5DC;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.instruction-step {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 8px;
}

.step-content {
    font-size: 14px;
    line-height: 1.5;
}

.step-content ul {
    padding-left: 20px;
    margin: 8px 0;
}

.step-content li {
    margin-bottom: 6px;
}

.subscription-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 12px;
    overflow-x: auto;
    display: block;
}

.subscription-table th, 
.subscription-table td {
    padding: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.subscription-table th {
    background-color: var(--secondary-bg);
}

.highlight {
    background-color: rgba(108, 92, 231, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.auth-btn {
    padding: 12px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    font-size: 14px;
}

.login-btn {
    background-color: var(--blue);
    color: white;
}

.login-btn:hover {
    background-color: #2563EB;
}

.register-btn {
    background-color: var(--green);
    color: white;
}

.register-btn:hover {
    background-color: #059669;
}

/* Footer */
.footer {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
}

.footer a {
    color: var(--blue);
    text-decoration: none;
    font-size: 12px;
}

.footer a:hover {
    text-decoration: underline;
}

/* Desktop styles */
@media only screen and (min-width: 768px) {
    .dashboard-container {
        max-width: 1400px;
        padding: 20px;
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 20px;
    }

    .header-section {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

    .dashboard-header {
        grid-column: 1 / -1;
        margin-bottom: 20px;
    }

    .dashboard-title {
        font-size: 48px;
    }

    .welcome-card {
        grid-column: 1 / -1;
        padding: 20px;
        margin-bottom: 20px;
    }

    .welcome-title {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .yello {
        color: #90EE90;
    }

    .welcome-text {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .instructions-card {
        grid-column: 1 / -1;
        padding: 25px;
    }

    .instructions-title {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .instruction-step {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .step-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .step-content {
        font-size: 16px;
    }

    .subscription-table {
        font-size: 14px;
        display: table;
    }

    .auth-buttons {
        flex-direction: row;
        gap: 15px;
    }

    .auth-btn {
        padding: 12px 30px;
        font-size: 16px;
    }

    .footer {
        grid-column: 1 / -1;
        font-size: 14px;
    }

    .leprechaun-container {
        text-align: center;
        margin: 20px 0;
    }

    .leprechaun-gif {
        width: 100px;
        height: auto;
        border-radius: 50%;
        box-shadow: 0 0 15px gold;
        animation: bounce 2s infinite;
    }

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

    @media (min-width: 768px) {
        .leprechaun-gif {
            width: 150px;
        }
    }

    .footer a {
        font-size: 14px;
    }
}

/* Login page specific styles */
.login-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.login-title {
    text-align: center;
    color: var(--blue);
    margin-bottom: 30px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 15px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 16px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #2563EB;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.register-link a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Мобильные стили для login */
@media (max-width: 768px) {
    .login-container {
        padding: 20px;
        margin: 10px auto;
        width: calc(100% - 20px);
    }

    .login-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 16px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 16px;
    }

    .toggle-password {
        right: 12px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-title {
        font-size: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }
}

/* Register page specific styles */
.register-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.register-title {
    text-align: center;
    color: var(--blue);
    margin-bottom: 30px;
    font-size: 24px;
}

.requirements {
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-secondary);
}

.requirements ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.requirements li {
    margin-bottom: 5px;
}

.requirements li.valid {
    color: var(--green);
}

.requirements li.invalid {
    color: var(--red);
}

.submit-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.login-link a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

.error-message {
    color: var(--red);
    font-size: 14px;
    margin-top: 5px;
}

.verification-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.verification-input {
    flex-grow: 1;
}

.send-code-btn {
    padding: 15px;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

.send-code-btn:hover {
    background: #00a884;
}

.send-code-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* Мобильные стили для register */
@media (max-width: 768px) {
    .register-container {
        padding: 20px;
        margin: 10px auto;
        width: calc(100% - 20px);
    }

    .register-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 16px;
    }

    .submit-btn, .send-code-btn {
        padding: 14px;
        font-size: 16px;
    }

    .toggle-password {
        right: 12px;
    }

    .verification-container {
        flex-direction: column;
    }

    .send-code-btn {
        width: 100%;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .register-container {
        padding: 15px;
    }

    .register-title {
        font-size: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .requirements {
        font-size: 12px;
    }
}

/* Settings page specific styles */
.settings-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    display: none;
}

.mobile-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--secondary-bg);
    border-radius: 10px;
    margin-bottom: 15px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--blue);
}

.back-btn {
    background-color: var(--purple);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.back-btn:hover {
    background-color: #7c3aed;
}

.settings-form-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.current-settings-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
}

.settings-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.settings-value {
    font-size: 16px;
    font-weight: 500;
    word-break: break-all;
}

.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    font-weight: normal;
    border: 1px solid var(--border-color);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.range-container {
    margin-top: 10px;
}

.range-slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 5px;
    outline: none;
    margin-bottom: 10px;
}

.range-slider::-webkit-slifier-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--blue);
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Settings Desktop Styles */
.settings-card {
    grid-column: span 8;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
}

.settings-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--blue);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.settings-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.stats-card {
    grid-column: span 4;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 25px;
}

.stats-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--blue);
}

.stats-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.stats-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stats-value {
    font-size: 18px;
    font-weight: 500;
}

.btn-secondary {
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #334155;
}

.btn-back {
    grid-column: span 12;
    background-color: var(--purple);
    color: white;
    border: none;
    margin-top: 20px;
}

.btn-back:hover {
    background-color: #7c3aed;
}

.logout-btnn {
    background-color: var(--purple);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.logout-btnn:hover {
    background-color: #7c3aed;
}

/* Responsive for settings */
@media (max-width: 1200px) {
    .dashboard-container {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .settings-card, .stats-card {
        grid-column: span 1;
    }
    
    .settings-form {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        display: none;
    }
    
    .settings-container {
        display: block;
    }
    
    .settings-content {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .dashboard-container {
        display: grid;
    }
    
    .settings-container {
        display: none;
    }
}

/* Subscribe page specific styles */
.plans-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.plans-header {
    text-align: center;
    margin-bottom: 40px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.plan-card {
    background: #1e1e2d;
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s ease;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.plan-card.popular {
    border: 2px solid #6c5ce7;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #6c5ce7;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.plan-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.plan-price {
    font-size: 28px;
    font-weight: 700;
    margin: 15px 0;
    color: #6c5ce7;
}

.plan-price.free {
    color: #00b894;
}

.plan-price.ton {
    color: #0088cc;
}

.plan-duration {
    color: #a5b1c2;
    margin-bottom: 15px;
}

.plan-features {
    margin: 20px 0;
}

.plan-features ul {
    list-style-type: none;
    padding: 0;
}

.plan-features li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
    color: #dfe6e9;
}

.plan-features li:before {
    content: "?";
    color: #00b894;
    position: absolute;
    left: 0;
}

.subscribe-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn-primary {
    background: #6c5ce7;
    color: white;
}

.btn-primary:hover {
    background: #5649be;
}

.btn-free {
    background: #00b894;
    color: white;
}

.btn-free:hover {
    background: #00a884;
}

.btn-ton {
    background: #0088cc;
    color: white;
}

.btn-ton:hover {
    background: #0077b3;
}

.back-btn {
    display: block;
    text-align: center;
    margin-top: 40px;
    color: #6c5ce7;
    font-weight: 600;
}

.info-text {
    text-align: center;
    margin-top: 30px;
    color: #a5b1c2;
    font-size: 14px;
}

.crypto-info {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 136, 204, 0.1);
    border-radius: 5px;
    color: #0088cc;
}




 :root {
            --primary-bg: #121826;
            --secondary-bg: #1E293B;
            --card-bg: #1E293B;
            --border-color: #2D3748;
            --text-primary: #F8FAFC;
            --text-secondary: #94A3B8;
            --green: #10B981;
            --red: #EF4444;
            --blue: #3B82F6;
            --purple: #8B5CF6;
            --yellow: #F59E0B;
            --orange: #F97316;
            --light-blue: #60A5FA;
            --beige: #D1B086;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--primary-bg);
            color: var(--text-primary);
            margin: 0;
            padding: 0;
            min-height: 100vh;
        }

        .dashboard-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 3px;
        }

        /* Header Section */
        .header-section {
            grid-column: 1 / -1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            background-color: var(--secondary-bg);
            border-radius: 8px;
            margin-bottom: 3px;
        }

        .user-info {
            display: flex;
            align-items: center;
            font-size: 14px;
        }

        .user-email {
            font-weight: 600;
            color: var(--blue);
            margin-left: 8px;
        }

        .logout-btn {
            background-color: var(--red);
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            font-weight: 500;
            font-size: 12px;
            transition: all 0.2s;
        }

        .logout-btn:hover {
            background-color: #DC2626;
        }

        /* Subscription Card */
        .subscription-card {
            grid-column: 1 / -1;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 10px 15px;
            border-left: 4px solid var(--green);
            height: 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .subscription-card.expired {
            border-left-color: var(--red);
        }

        .subscription-title {
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 3px;
            color: var(--text-primary);
        }

        .subscription-details {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .detail-item {
            display: flex;
            align-items: center;
            margin-bottom: 0;
        }

        .detail-label {
            font-size: 10px;
            color: var(--text-secondary);
            margin-right: 5px;
        }

        .detail-value {
            font-size: 10px;
            font-weight: 500;
        }

        .progress-container {
            grid-column: span 4;
            margin-top: 5px;
        }

        .progress-bar {
            height: 4px;
            background-color: #334155;
            border-radius: 2px;
            overflow: hidden;
        }

        .progress {
            height: 100%;
            background-color: var(--green);
            width: {{ (1 - (user_data['days_remaining'] / 30)) * 100 }}%;
        }

        .progress-text {
            font-size: 8px;
            color: var(--text-secondary);
            margin-top: 2px;
            text-align: right;
        }

        /* Parameters Container */
        .parameters-container {
            grid-column: 1 / -1;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 10px;
            height: 100px;
        }

        .parameters-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            background-color: var(--secondary-bg);
            margin-bottom: 8px;
            padding-left: 5px;
        }

        .parameters-grid {
            display: flex;
            height: 50px;
            gap: 3px;
        }

        .parameter-card {
            flex: 1;
            background-color: var(--primary-bg);
            border-radius: 6px;
            padding: 5px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 70px;
            min-width: 0;
        }

        .parameter-icon {
            font-size: 12px;
            margin-bottom: 3px;
        }

        .parameter-title {
            font-size: 10px;
            color: var(--text-secondary);
            margin-bottom: 3px;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        .parameter-value {
            font-size: 10px;
            font-weight: 600;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        .parameter-change {
            font-size: 10px;
            margin-top: 2px;
        }

        .positive {
            color: var(--green);
        }

        .negative {
            color: var(--red);
        }

        /* Chart Section */
        .chart-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 3px;
        }

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

        .chart-title {
            font-size: 14px;
            font-weight: 600;
        }

        .chart-container {
            height: 250px;
            position: relative;
        }

        /* Recent Trades */
        .trades-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
        }

        .section-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 15px;
        }

        .trades-container {
            max-height: 300px;
            overflow-y: auto;
        }

        .trades-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }

        .trades-table th {
            text-align: left;
            padding: 8px 0;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            background-color: var(--card-bg);
        }

        .trades-table td {
            padding: 8px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .trade-profit {
            font-weight: 500;
        }

        .profit-positive {
            color: var(--green);
        }

        .profit-negative {
            color: var(--red);
        }

        /* Bot Controls */
        .controls-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .bot-status {
            display: flex;
            align-items: center;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 8px;
        }

        .status-active {
            background-color: var(--green);
            box-shadow: 0 0 8px var(--green);
        }

        .status-inactive {
            background-color: var(--red);
            box-shadow: 0 0 8px var(--red);
        }

        .status-text {
            font-weight: 500;
            font-size: 12px;
        }

        .control-buttons {
            display: flex;
            gap: 8px;
        }

        .control-btn {
            padding: 6px 12px;
            border-radius: 4px;
            font-weight: 500;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
            font-size: 11px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            position: relative;
            border: 1px solid rgba(255, 255, 255, 0.1);
            text-align: center;
            text-decoration: none;
            display: inline-block;
            white-space: nowrap;
        }

        .control-btn:active {
            transform: translateY(1px);
            box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
        }

        .start-btn {
            background-color: var(--green);
            color: white;
        }

        .start-btn:hover:not(:disabled) {
            background-color: #059669;
        }

        .stop-btn {
            background-color: var(--red);
            color: white;
        }

        .stop-btn:hover:not(:disabled) {
            background-color: #DC2626;
        }

        .settings-btn {
            background-color: var(--light-blue);
            color: white;
        }

        .settings-btn:hover {
            background-color: #3B82F6;
        }

        .instruction-btn {
            background-color: var(--orange);
            color: white;
        }

        .instruction-btn:hover {
            background-color: #EA580C;
        }

        .subscribe-btn {
            background-color: var(--beige);
            color: black;
        }

        .subscribe-btn:hover {
            background-color: #C19A6B;
        }

        .logout-btn {
            background-color: var(--red);
            color: white;
        }

        .logout-btn:hover {
            background-color: #DC2626;
        }

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

        .bot-notice {
            font-size: 9px;
            color: var(--text-secondary);
            margin-top: 4px;
            text-align: center;
            grid-column: 1 / -1;
        }

        /* Logs Section */
        .logs-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
            height: 430px; /* Увеличено с 150px */
        }

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

        .logs-container {
            height: 320px; /* Увеличено с 150px */
            overflow-y: auto;
            background-color: #0F172A;
            border-radius: 4px;
            padding: 10px;
            font-family: 'Courier New', monospace;
            font-size: 11px;
        }

        .log-entry {
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border-color);
            line-height: 1.4;
        }

        .log-entry:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .log-timestamp {
            color: var(--text-secondary);
        }

        .log-message {
            color: var(--text-primary);
        }

        .log-success {
            color: var(--green);
        }

        .log-error {
            color: var(--red);
        }

        .log-warning {
            color: var(--yellow);
        }

        .log-info {
            color: #FFFACD;
        }

        /* Mobile-specific styles */
        @media only screen and (max-width: 768px) {
            .dashboard-container {
                grid-template-columns: 1fr;
                padding: 10px;
                gap: 10px;
                width: 100%;
                box-sizing: border-box;
            }

            .header-section,
            .subscription-card,
            .parameters-container,
            .chart-section,
            .trades-section,
            .controls-section,
            .logs-section {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                margin-left: 0;
                margin-right: 0;
                grid-column: 1 / -1;
            }

            .header-section {
                flex-direction: column;
                align-items: flex-start;
                padding: 15px;
                margin-bottom: 10px;
            }

            .user-info {
                width: 100%;
                margin-bottom: 10px;
            }

            .subscription-card {
                height: auto;
                padding: 15px;
            }

            .subscription-details {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .progress-container {
                grid-column: 1;
            }

            .parameters-container {
                height: auto;
                padding: 15px;
            }

            .parameters-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                height: auto;
                gap: 8px;
            }

            .parameter-card {
                height: 80px;
                padding: 8px;
            }

            .parameter-icon {
                font-size: 14px;
            }

            .parameter-title {
                font-size: 11px;
            }

            .parameter-value {
                font-size: 12px;
            }

            .chart-section {
                padding: 15px;
            }

            .chart-container {
                height: 250px;
            }

            .trades-section {
                padding: 15px;
            }

            .trades-table {
                font-size: 11px;
            }

            .controls-section {
                flex-direction: column;
                gap: 10px;
                padding: 15px;
            }

            .control-buttons {
                width: 100%;
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }

            .control-btn {
                width: 100%;
                height: 40px;
                padding: 0;
                font-size: 12px;
                box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
                border: 1px solid rgba(255, 255, 255, 0.2);
                display: flex;
                align-items: center;
                justify-content: center;
                min-width: 120px;
            }

            .bot-notice {
                margin-top: 10px;
                font-size: 10px;
            }

               }

        /* Desktop-specific adjustments */
        @media only screen and (min-width: 769px) {
            .dashboard-container {
                grid-template-columns: repeat(12, 1fr);
            }

            .header-section {
                grid-column: 1 / -1;
                flex-direction: row;
            }

            .subscription-card {
                grid-column: 1 / -1;
            }

            .parameters-container {
                grid-column: 1 / -1;
            }

            .chart-section {
                grid-column: span 12;
            }

            .trades-section {
                grid-column: span 12;
            }

            .controls-section {
                grid-column: span 12;
                flex-direction: row;
            }

            .logs-section {
                grid-column: span 12;
                height: 480px; /* Увеличено с 150px */
            }

            .logs-container {
                height: 420px; /* Увеличено с 150px */
            }

            .control-btn {
                box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
                border: 1px solid rgba(255, 255, 255, 0.1);
            }
        }



            .dashboard-header {
                grid-column: 1 / -1;
                text-align: center;
                margin-bottom: 3px;
            }

            .dashboard-title {
                font-size: 24px;
                font-weight: 700;
                text-transform: uppercase;
                background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
                background-size: 200% auto;
                color: #8B5CF6;
                -webkit-background-clip: text;
                background-clip: text;
                animation: shine 3s linear infinite;
            }

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

/* Общий стиль для всех секций */
.chart-section,
.trades-section,
.controls-section,
.logs-section {
    margin-bottom: 3px;
}

/* Убираем лишний отступ у последней секции */
.logs-section {
    margin-bottom: 0;
}

/* Для мобильной версии */
@media only screen and (max-width: 768px) {
    .chart-section,
    .trades-section,
    .controls-section,
    .logs-section {
        margin-bottom: 3px;
    }

.trades-table th, 
.trades-table td {
    padding: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
    font-size: 11px; /* Уменьшаем размер шрифта для компактности */
}

.trades-table th:nth-child(4),
.trades-table td:nth-child(4) {
    text-align: right; /* Выравнивание суммы USDT по правому краю */
}

.trades-table td:nth-child(3) {
    text-align: right; /* Выравнивание количества токенов по правому краю */
}

.trades-table td:nth-child(5) {
    text-align: right; /* Выравнивание прибыли по правому краю */
}

@media only screen and (max-width: 768px) {
    .trades-table {
        font-size: 10px; /* Еще меньше шрифт на мобильных */
    }
    
    .trades-table th, 
    .trades-table td {
        padding: 6px 3px;
    }
    
    .trades-table th:nth-child(1),
    .trades-table td:nth-child(1) {
        white-space: nowrap; /* Даты в одну строку */
    }
}

/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.lang-btn {
    padding: 8px 12px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    min-width: 120px;
    z-index: 1000;
}

.language-switcher:hover .lang-options {
    display: block;
}

.lang-options div {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-options div:hover {
    background: var(--secondary-bg);
}

.lang-options div:last-child {
    border-bottom: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    .language-switcher {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }
    
    .lang-btn {
        background: var(--blue);
        color: white;
    }
}


/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.lang-btn {
    padding: 8px 12px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    min-width: 120px;
    z-index: 1000;
}

.language-switcher:hover .lang-options {
    display: block;
}

.lang-options div {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 5px;
}
 
.lang-options div:hover {
    background: var(--secondary-bg);
}

.lang-options div:last-child {
    border-bottom: none;
}

/* Mobile styles */
@media (max-width: 768px) {
    .language-switcher {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }
    
    .lang-btn {
        background: var(--blue);
        color: white;
    }
}


/* Мобильные стили */
@media (max-width: 768px) {
    body {
        padding: 10px;
        display: block;
        padding-top: 20px; /* Добавляем отступ для переключателя */
    }

    .login-container {
        padding: 20px;
        margin: 10px auto;
        width: calc(100% - 20px);
    }

    .login-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 16px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 16px;
    }

    .toggle-password {
        right: 12px;
    }

    /* Исправленные стили для переключателя */
    .language-switcher {
        position: static;
        margin-bottom: 20px;
        text-align: center;
        width: 100%;
    }
    
    .lang-btn {
        background: var(--blue);
        color: white;
        width: auto;
        display: inline-flex;
    }
    
    .lang-options {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-title {
        font-size: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }
    
    .lang-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}



   /* Language Switcher Styles */
        .language-switcher {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1000;
            background: var(--primary-bg);
            padding: 10px;
            border-radius: 8px;
            backdrop-filter: blur(10px);
            border: 1px solid #2d3748;
            display: flex;
            gap: 5px;
        }
        .lang-btn {
            padding: 6px 12px;
            border: 1px solid #4a5568;
            background: var(--primary-bg);
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            text-decoration: none;
            color: #e2e8f0;
            transition: all 0.3s ease;
        }
        .lang-btn.active {
            background: var(--primary-bg);
            color: white;
            border: 3px solid #FFFFFF;
            border-color: #FFFFFF;
        }
        .lang-btn:hover {
            background: #4a5568;
            transform: translateY(-1px);
        }
        
        .flash-messages {
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 999;
            max-width: 300px;
        }
        .alert {
            padding: 12px 16px;
            margin-bottom: 10px;
            border-radius: 6px;
            font-size: 14px;
            background: #1e293b;
            border-left: 4px solid;
            color: white;
        }
        .alert-success {
            border-color: #10B981;
        }
        .alert-error {
            border-color: #EF4444;
        }

        :root {
            --primary-bg: #121826;
            --secondary-bg: #1E293B;
            --card-bg: #1E293B;
            --border-color: #2D3748;
            --text-primary: #F8FAFC;
            --text-secondary: #94A3B8;
            --green: #10B981;
            --red: #EF4444;
            --blue: #3B82F6;
            --purple: #8B5CF6;
            --yellow: #F59E0B;
            --orange: #F97316;
            --light-blue: #60A5FA;
            --beige: #D1B086;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--primary-bg);
            color: var(--text-primary);
            margin: 0;
            padding: 0;
            min-height: 100vh;
        }

        .dashboard-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 3px;
        }

        /* Header Section */
        .header-section {
            grid-column: 1 / -1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            background-color: var(--secondary-bg);
            border-radius: 8px;
            margin-bottom: 3px;
        }

        .user-info {
            display: flex;
            align-items: center;
            font-size: 14px;
        }

        .user-email {
            font-weight: 600;
            color: #F8F8FF; /* GhostWhite */
            margin-left: 8px;
            text-shadow: none;
        }

        .header-section .user-email {
            text-shadow: none !important;
        }

        .logout-btn {
            background-color: var(--red);
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            font-weight: 500;
            font-size: 12px;
            transition: all 0.2s;
        }

        .logout-btn:hover {
            background-color: #DC2626;
        }

        /* Subscription Card */
        .subscription-card {
            grid-column: 1 / -1;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 10px 15px;
            border-left: 4px solid var(--green);
            height: 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .subscription-card.expired {
            border-left-color: var(--red);
        }

        .subscription-title {
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 3px;
            color: var(--text-primary);
        }

        .subscription-details {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .detail-item {
            display: flex;
            align-items: center;
            margin-bottom: 0;
        }

        .detail-label {
            font-size: 10px;
            color: var(--text-secondary);
            margin-right: 5px;
        }

        .detail-value {
            font-size: 10px;
            font-weight: 500;
        }

        .progress-container {
            grid-column: span 4;
            margin-top: 5px;
        }

        .progress-bar {
            height: 4px;
            background-color: #334155;
            border-radius: 2px;
            overflow: hidden;
        }

        .progress {
            height: 100%;
            background-color: var(--green);
            width: {{ (1 - (user_data['days_remaining'] / 30)) * 100 }}%;
        }

        .progress-text {
            font-size: 8px;
            color: var(--text-secondary);
            margin-top: 2px;
            text-align: right;
        }

        /* Parameters Container */
        .parameters-container {
            grid-column: 1 / -1;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 10px;
            height: 100px;
        }

        .parameters-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            background-color: var(--secondary-bg);
            margin-bottom: 8px;
            padding-left: 5px;
        }

        .parameters-grid {
            display: flex;
            height: 50px;
            gap: 3px;
        }

        .parameter-card {
            flex: 1;
            background-color: var(--primary-bg);
            border-radius: 6px;
            padding: 5px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 70px;
            min-width: 0;
        }

        .parameter-icon {
            font-size: 12px;
            margin-bottom: 3px;
        }

        .parameter-title {
            font-size: 10px;
            color: var(--text-secondary);
            margin-bottom: 3px;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        .parameter-value {
            font-size: 10px;
            font-weight: 600;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        .parameter-change {
            font-size: 10px;
            margin-top: 2px;
        }

        .positive {
            color: var(--green);
        }

        .negative {
            color: var(--red);
        }

        /* Chart Section (aesthetic tweaks) */
        .chart-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 12px;
            padding: 16px 18px 18px 18px;
            margin-bottom: 3px;
            border: 1px solid rgba(255,255,255,0.06);
            box-shadow: 0 6px 20px rgba(0,0,0,0.25);
        }

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

        .chart-title {
            font-size: 14px;
            font-weight: 600;
            letter-spacing: .3px;
        }

        .chart-container {
            height: 260px;
            position: relative;
            border-radius: 10px;
            overflow: hidden; /* чтобы заливка внутри плагина не выходила за скругления */
        }

        /* Recent Trades */
        .trades-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
        }

        .section-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 15px;
        }

        .trades-container {
            max-height: 300px;
            overflow-y: auto;
        }

        .trades-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }

        .trades-table th {
            text-align: left;
            padding: 8px 0;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            background-color: var(--card-bg);
        }

        .trades-table td {
            padding: 8px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .trade-profit {
            font-weight: 500;
        }

        .profit-positive {
            color: var(--green);
        }

        .profit-negative {
            color: var(--red);
        }

        /* Bot Controls */
        .controls-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            overflow-x: auto;
        }

        .bot-status {
            display: flex;
            align-items: center;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 8px;
        }

        .status-active {
            background-color: var(--green);
            box-shadow: 0 0 8px var(--green);
        }

        .status-inactive {
            background-color: var(--red);
            box-shadow: 0 0 8px var(--red);
        }

        .status-text {
            font-weight: 500;
            font-size: 12px;
        }

        .control-buttons {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: max-content;
            gap: 8px;
            align-items: center;
            justify-content: start;
            white-space: nowrap;
        }

        .control-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 32px;
            padding: 0 12px;
            line-height: 1;
            font-size: 11px;
            font-weight: 500;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-sizing: border-box;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s;
            width: auto;
            min-width: 96px;
            flex: 0 0 auto;
            white-space: nowrap;
        }

        .control-buttons a.control-btn,
        .control-buttons button.control-btn {
            display: inline-flex !important;
            margin: 0 !important;
            vertical-align: middle;
            height: 32px;
            padding: 0 12px;
            line-height: 1;
            white-space: nowrap;
        }

        .control-btn:active {
            transform: translateY(1px);
            box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
        }

        .start-btn { background-color: var(--green); color: white; }
        .start-btn:hover:not(:disabled) { background-color: #059669; }

        .stop-btn { background-color: var(--red); color: white; }
        .stop-btn:hover:not(:disabled) { background-color: #DC2626; }

        .settings-btn { background-color: var(--light-blue); color: white; }
        .settings-btn:hover { background-color: #3B82F6; }

        .instruction-btn { background-color: var(--orange); color: white; }
        .instruction-btn:hover { background-color: #EA580C; }

        .subscribe-btn { background-color: var(--beige); color: black; }
        .subscribe-btn:hover { background-color: #C19A6B; }

        .logout-btn { background-color: var(--red); color: white; }
        .logout-btn:hover { background-color: #DC2626; }

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

        .bot-notice {
            font-size: 9px;
            color: var(--text-secondary);
            margin-top: 4px;
            text-align: center;
            grid-column: 1 / -1;
        }

        /* Logs Section */
        .logs-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
            height: 430px;
        }

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

/* Стиль индикатора обновления — как у строк логов */
.log-status,
#logStatus {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary); /* белый как логи */
    letter-spacing: 0.2px;
}


        .logs-container {
            height: 320px;
            overflow-y: auto;
            background-color: #0F172A;
            border-radius: 4px;
            padding: 10px;
            font-family: 'Courier New', monospace;
            font-size: 11px;
        }

        .log-entry {
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border-color);
            line-height: 1.4;
        }

        .log-entry:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

        .log-timestamp { color: var(--text-secondary); }
        .log-message { color: var(--text-primary); }
        .log-success { color: var(--green); }
        .log-error { color: var(--red); }
        .log-warning { color: var(--yellow); }
        .log-info { color: #FFFACD; }

        /* Mobile-specific styles */
        @media only screen and (max-width: 768px) {
            .dashboard-container {
                grid-template-columns: 1fr;
                padding: 10px;
                gap: 10px;
                width: 100%;
                box-sizing: border-box;
            }

            .header-section,
            .subscription-card,
            .parameters-container,
            .chart-section,
            .trades-section,
            .controls-section,
            .logs-section {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                margin-left: 0;
                margin-right: 0;
                grid-column: 1 / -1;
            }

            .header-section {
                flex-direction: column;
                align-items: flex-start;
                padding: 15px;
                margin-bottom: 10px;
            }

            .user-info { width: 100%; margin-bottom: 10px; }

            .subscription-card { height: auto; padding: 15px; }

            .subscription-details { grid-template-columns: 1fr; gap: 8px; }

            .progress-container { grid-column: 1; }

            .parameters-container { height: auto; padding: 15px; }

            .parameters-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                height: auto;
                gap: 8px;
            }

            .parameter-card { height: 80px; padding: 8px; }
            .parameter-icon { font-size: 14px; }
            .parameter-title { font-size: 11px; }
            .parameter-value { font-size: 12px; }

            .chart-section { padding: 15px; }
            .chart-container { height: 260px; }

            .trades-section { padding: 15px; }
            .trades-table { font-size: 11px; }

            .controls-section { flex-direction: column; gap: 10px; padding: 15px; }

            .control-buttons {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                grid-auto-flow: row;
                gap: 8px;
                width: 100%;
            }

            .control-btn {
                width: 100%;
                height: 40px;
                padding: 0;
                font-size: 12px;
                box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
                border: 1px solid rgba(255, 255, 255, 0.2);
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 120px;
            }

            .bot-notice { margin-top: 10px; font-size: 10px; }

            .language-switcher {
                position: relative;
                top: auto;
                right: auto;
                margin-bottom: 15px;
                justify-content: center;
            }
        }

        /* Desktop-specific adjustments */
        @media only screen and (min-width: 769px) {
            .dashboard-container { grid-template-columns: repeat(12, 1fr); }
            .header-section { grid-column: 1 / -1; flex-direction: row; }
            .subscription-card { grid-column: 1 / -1; }
            .parameters-container { grid-column: 1 / -1; }
            .chart-section { grid-column: span 12; }
            .trades-section { grid-column: span 12; }
            .controls-section { grid-column: span 12; flex-direction: row; }
            .logs-section { grid-column: span 12; height: 480px; }
            .logs-container { height: 420px; }
            .control-btn {
                box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
                border: 1px solid rgba(255, 255, 255, 0.1);
            }
        }

        .dashboard-header {
            grid-column: 1 / -1;
            text-align: center;
            margin-bottom: 3px;
        }

        .dashboard-title {
            font-size: 24px;
            font-weight: 700;
            text-transform: uppercase;
            color: #F8F8FF; /* GhostWhite */
        }

        @keyframes ghostGlow {
            0%, 100% {
                text-shadow:
                    0 0 2px  rgba(248,248,255,0.8),
                    0 0 6px  rgba(248,248,255,0.6),
                    0 0 12px rgba(248,248,255,0.5),
                    0 0 18px rgba(139, 92, 246, 0.25);
            }
            50% {
                text-shadow:
                    0 0 3px  rgba(248,248,255,1),
                    0 0 10px rgba(248,248,255,0.9),
                    0 0 18px rgba(248,248,255,0.8),
                    0 0 28px rgba(139, 92, 246, 0.4);
            }
        }

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

        .chart-section,
        .trades-section,
        .controls-section,
        .logs-section { margin-bottom: 3px; }

        .logs-section { margin-bottom: 0; }

        @media only screen and (max-width: 768px) {
            .chart-section,
            .trades-section,
            .controls-section,
            .logs-section { margin-bottom: 3px; }

            .trades-table th, 
            .trades-table td {
                padding: 8px;
                border: 1px solid var(--border-color);
                text-align: left;
                font-size: 11px;
            }

            .trades-table th:nth-child(4),
            .trades-table td:nth-child(4) { text-align: right; }

            .trades-table td:nth-child(3) { text-align: right; }

            .trades-table td:nth-child(5) { text-align: right; }

            @media only screen and (max-width: 768px) {
                .trades-table { font-size: 10px; }
                .trades-table th, .trades-table td { padding: 6px 3px; }
                .trades-table th:nth-child(1),
                .trades-table td:nth-child(1) { white-space: nowrap; }
            }
        }

   /* Language Switcher Styles */
        .language-switcher {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1000;
            background: var(--primary-bg);
            padding: 10px;
            border-radius: 8px;
            backdrop-filter: blur(10px);
            border: 1px solid #2d3748;
            display: flex;
            gap: 5px;
        }
        .lang-btn {
            padding: 6px 12px;
            border: 1px solid #4a5568;
            background: var(--primary-bg);
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            text-decoration: none;
            color: #e2e8f0;
            transition: all 0.3s ease;
        }
        .lang-btn.active {
            background: var(--primary-bg);
            color: white;
            border: 3px solid #FFFFFF;
            border-color: #FFFFFF;
        }
        .lang-btn:hover {
            background: #4a5568;
            transform: translateY(-1px);
        }
        
        .flash-messages {
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 999;
            max-width: 300px;
        }
        .alert {
            padding: 12px 16px;
            margin-bottom: 10px;
            border-radius: 6px;
            font-size: 14px;
            background: #1e293b;
            border-left: 4px solid;
            color: white;
        }
        .alert-success {
            border-color: #10B981;
        }
        .alert-error {
            border-color: #EF4444;
        }

        :root {
            --primary-bg: #121826;
            --secondary-bg: #1E293B;
            --card-bg: #1E293B;
            --border-color: #2D3748;
            --text-primary: #F8FAFC;
            --text-secondary: #94A3B8;
            --green: #10B981;
            --red: #EF4444;
            --blue: #3B82F6;
            --purple: #8B5CF6;
            --yellow: #F59E0B;
            --orange: #F97316;
            --light-blue: #60A5FA;
            --beige: #D1B086;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--primary-bg);
            color: var(--text-primary);
            margin: 0;
            padding: 0;
            min-height: 100vh;
        }

        .dashboard-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            gap: 3px;
        }

        /* Header Section */
        .header-section {
            grid-column: 1 / -1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
            background-color: var(--secondary-bg);
            border-radius: 8px;
            margin-bottom: 3px;
        }

        .user-info {
            display: flex;
            align-items: center;
            font-size: 14px;
        }

        .user-email {
            font-weight: 600;
            color: #F8F8FF; /* GhostWhite */
            margin-left: 8px;
            text-shadow: none;
        }

        .header-section .user-email {
            text-shadow: none !important;
        }

        .logout-btn {
            background-color: var(--red);
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            font-weight: 500;
            font-size: 12px;
            transition: all 0.2s;
        }

        .logout-btn:hover {
            background-color: #DC2626;
        }

        /* Subscription Card */
        .subscription-card {
            grid-column: 1 / -1;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 10px 15px;
            border-left: 4px solid var(--green);
            height: 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .subscription-card.expired {
            border-left-color: var(--red);
        }

        .subscription-title {
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 3px;
            color: var(--text-primary);
        }

        .subscription-details {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .detail-item {
            display: flex;
            align-items: center;
            margin-bottom: 0;
        }

        .detail-label {
            font-size: 10px;
            color: var(--text-secondary);
            margin-right: 5px;
        }

        .detail-value {
            font-size: 10px;
            font-weight: 500;
        }

        .progress-container {
            grid-column: span 4;
            margin-top: 5px;
        }

        .progress-bar {
            height: 4px;
            background-color: #334155;
            border-radius: 2px;
            overflow: hidden;
        }

        .progress {
            height: 100%;
            background-color: var(--green);
            width: {{ (1 - (user_data['days_remaining'] / 30)) * 100 }}%;
        }

        .progress-text {
            font-size: 8px;
            color: var(--text-secondary);
            margin-top: 2px;
            text-align: right;
        }

        /* Parameters Container */
        .parameters-container {
            grid-column: 1 / -1;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 10px;
            height: 100px;
        }

        .parameters-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            background-color: var(--secondary-bg);
            margin-bottom: 8px;
            padding-left: 5px;
        }

        .parameters-grid {
            display: flex;
            height: 50px;
            gap: 3px;
        }

        .parameter-card {
            flex: 1;
            background-color: var(--primary-bg);
            border-radius: 6px;
            padding: 5px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 70px;
            min-width: 0;
        }

        .parameter-icon {
            font-size: 12px;
            margin-bottom: 3px;
        }

        .parameter-title {
            font-size: 10px;
            color: var(--text-secondary);
            margin-bottom: 3px;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        .parameter-value {
            font-size: 10px;
            font-weight: 600;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
        }

        .parameter-change {
            font-size: 10px;
            margin-top: 2px;
        }

        .positive {
            color: var(--green);
        }

        .negative {
            color: var(--red);
        }

        /* Chart Section (aesthetic tweaks) */
        .chart-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 12px;
            padding: 16px 18px 18px 18px;
            margin-bottom: 3px;
            border: 1px solid rgba(255,255,255,0.06);
            box-shadow: 0 6px 20px rgba(0,0,0,0.25);
        }

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

        .chart-title {
            font-size: 14px;
            font-weight: 600;
            letter-spacing: .3px;
        }

        .chart-container {
            height: 260px;
            position: relative;
            border-radius: 10px;
            overflow: hidden; /* чтобы заливка внутри плагина не выходила за скругления */
        }

        /* Recent Trades */
        .trades-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
        }

        .section-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 15px;
        }

        .trades-container {
            max-height: 300px;
            overflow-y: auto;
        }

        .trades-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }

        .trades-table th {
            text-align: left;
            padding: 8px 0;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            background-color: var(--card-bg);
        }

        .trades-table td {
            padding: 8px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .trade-profit {
            font-weight: 500;
        }

        .profit-positive {
            color: var(--green);
        }

        .profit-negative {
            color: var(--red);
        }

        /* Bot Controls */
        .controls-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            overflow-x: auto;
        }

        .bot-status {
            display: flex;
            align-items: center;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 8px;
        }

        .status-active {
            background-color: var(--green);
            box-shadow: 0 0 8px var(--green);
        }

        .status-inactive {
            background-color: var(--red);
            box-shadow: 0 0 8px var(--red);
        }

        .status-text {
            font-weight: 500;
            font-size: 12px;
        }

        .control-buttons {
            display: grid;
            grid-auto-flow: column;
            grid-auto-columns: max-content;
            gap: 8px;
            align-items: center;
            justify-content: start;
            white-space: nowrap;
        }

        .control-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 32px;
            padding: 0 12px;
            line-height: 1;
            font-size: 11px;
            font-weight: 500;
            border-radius: 4px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-sizing: border-box;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s;
            width: auto;
            min-width: 96px;
            flex: 0 0 auto;
            white-space: nowrap;
        }

        .control-buttons a.control-btn,
        .control-buttons button.control-btn {
            display: inline-flex !important;
            margin: 0 !important;
            vertical-align: middle;
            height: 32px;
            padding: 0 12px;
            line-height: 1;
            white-space: nowrap;
        }

        .control-btn:active {
            transform: translateY(1px);
            box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
        }

        .start-btn { background-color: var(--green); color: white; }
        .start-btn:hover:not(:disabled) { background-color: #059669; }

        .stop-btn { background-color: var(--red); color: white; }
        .stop-btn:hover:not(:disabled) { background-color: #DC2626; }

        .settings-btn { background-color: var(--light-blue); color: white; }
        .settings-btn:hover { background-color: #3B82F6; }

        .instruction-btn { background-color: var(--orange); color: white; }
        .instruction-btn:hover { background-color: #EA580C; }

        .subscribe-btn { background-color: var(--beige); color: black; }
        .subscribe-btn:hover { background-color: #C19A6B; }

        .logout-btn { background-color: var(--red); color: white; }
        .logout-btn:hover { background-color: #DC2626; }

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

        .bot-notice {
            font-size: 9px;
            color: var(--text-secondary);
            margin-top: 4px;
            text-align: center;
            grid-column: 1 / -1;
        }

        /* Logs Section */
        .logs-section {
            grid-column: span 12;
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 15px;
            height: 430px;
        }

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

/* Стиль индикатора обновления — как у строк логов */
.log-status,
#logStatus {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary); /* белый как логи */
    letter-spacing: 0.2px;
}


        .logs-container {
            height: 320px;
            overflow-y: auto;
            background-color: #0F172A;
            border-radius: 4px;
            padding: 10px;
            font-family: 'Courier New', monospace;
            font-size: 11px;
        }

        .log-entry {
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border-color);
            line-height: 1.4;
        }

        .log-entry:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

        .log-timestamp { color: var(--text-secondary); }
        .log-message { color: var(--text-primary); }
        .log-success { color: var(--green); }
        .log-error { color: var(--red); }
        .log-warning { color: var(--yellow); }
        .log-info { color: #FFFACD; }

        /* Mobile-specific styles */
        @media only screen and (max-width: 768px) {
            .dashboard-container {
                grid-template-columns: 1fr;
                padding: 10px;
                gap: 10px;
                width: 100%;
                box-sizing: border-box;
            }

            .header-section,
            .subscription-card,
            .parameters-container,
            .chart-section,
            .trades-section,
            .controls-section,
            .logs-section {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                margin-left: 0;
                margin-right: 0;
                grid-column: 1 / -1;
            }

            .header-section {
                flex-direction: column;
                align-items: flex-start;
                padding: 15px;
                margin-bottom: 10px;
            }

            .user-info { width: 100%; margin-bottom: 10px; }

            .subscription-card { height: auto; padding: 15px; }

            .subscription-details { grid-template-columns: 1fr; gap: 8px; }

            .progress-container { grid-column: 1; }

            .parameters-container { height: auto; padding: 15px; }

            .parameters-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                height: auto;
                gap: 8px;
            }

            .parameter-card { height: 80px; padding: 8px; }
            .parameter-icon { font-size: 14px; }
            .parameter-title { font-size: 11px; }
            .parameter-value { font-size: 12px; }

            .chart-section { padding: 15px; }
            .chart-container { height: 260px; }

            .trades-section { padding: 15px; }
            .trades-table { font-size: 11px; }

            .controls-section { flex-direction: column; gap: 10px; padding: 15px; }

            .control-buttons {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                grid-auto-flow: row;
                gap: 8px;
                width: 100%;
            }

            .control-btn {
                width: 100%;
                height: 40px;
                padding: 0;
                font-size: 12px;
                box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
                border: 1px solid rgba(255, 255, 255, 0.2);
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 120px;
            }

            .bot-notice { margin-top: 10px; font-size: 10px; }

            .language-switcher {
                position: relative;
                top: auto;
                right: auto;
                margin-bottom: 15px;
                justify-content: center;
            }
        }

        /* Desktop-specific adjustments */
        @media only screen and (min-width: 769px) {
            .dashboard-container { grid-template-columns: repeat(12, 1fr); }
            .header-section { grid-column: 1 / -1; flex-direction: row; }
            .subscription-card { grid-column: 1 / -1; }
            .parameters-container { grid-column: 1 / -1; }
            .chart-section { grid-column: span 12; }
            .trades-section { grid-column: span 12; }
            .controls-section { grid-column: span 12; flex-direction: row; }
            .logs-section { grid-column: span 12; height: 480px; }
            .logs-container { height: 420px; }
            .control-btn {
                box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
                border: 1px solid rgba(255, 255, 255, 0.1);
            }
        }

        .dashboard-header {
            grid-column: 1 / -1;
            text-align: center;
            margin-bottom: 3px;
        }

        .dashboard-title {
            font-size: 24px;
            font-weight: 700;
            text-transform: uppercase;
            color: #F8F8FF; /* GhostWhite */
        }

        @keyframes ghostGlow {
            0%, 100% {
                text-shadow:
                    0 0 2px  rgba(248,248,255,0.8),
                    0 0 6px  rgba(248,248,255,0.6),
                    0 0 12px rgba(248,248,255,0.5),
                    0 0 18px rgba(139, 92, 246, 0.25);
            }
            50% {
                text-shadow:
                    0 0 3px  rgba(248,248,255,1),
                    0 0 10px rgba(248,248,255,0.9),
                    0 0 18px rgba(248,248,255,0.8),
                    0 0 28px rgba(139, 92, 246, 0.4);
            }
        }

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

        .chart-section,
        .trades-section,
        .controls-section,
        .logs-section { margin-bottom: 3px; }

        .logs-section { margin-bottom: 0; }

        @media only screen and (max-width: 768px) {
            .chart-section,
            .trades-section,
            .controls-section,
            .logs-section { margin-bottom: 3px; }

            .trades-table th, 
            .trades-table td {
                padding: 8px;
                border: 1px solid var(--border-color);
                text-align: left;
                font-size: 11px;
            }

            .trades-table th:nth-child(4),
            .trades-table td:nth-child(4) { text-align: right; }

            .trades-table td:nth-child(3) { text-align: right; }

            .trades-table td:nth-child(5) { text-align: right; }

            @media only screen and (max-width: 768px) {
                .trades-table { font-size: 10px; }
                .trades-table th, .trades-table td { padding: 6px 3px; }
                .trades-table th:nth-child(1),
                .trades-table td:nth-child(1) { white-space: nowrap; }
            }
        }

}
