:root {
    --primary-color: #f8f9fa;
    --secondary-color: #e9ecef;
    --accent-color: #6c757d;
    --dark-accent: #495057;
    --text-color: #212529;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --success-color: #28a745;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

h1 {
    font-weight: 500;
    color: var(--text-color);
}

.contact {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.contact:hover {
    color: var(--dark-accent);
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.api-section, #login-form, #response-container, #history-container {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    padding-right: 40px;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 16px;
    margin-left: 10px;
    transition: color 0.3s;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background-color: var(--secondary-color);
    color: var(--dark-accent);
}

.submit-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.submit-btn:hover {
    background-color: var(--dark-accent);
}

.user-greeting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hidden {
    display: none !important;
}

#response-container {
    position: relative;
}

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

.response-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    font-family: monospace;
    white-space: pre-wrap;
    border: 1px solid #dee2e6;
}

.response-emoji {
    font-size: 40px;
    text-align: center;
    margin-top: 15px;
}

.history-content {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--accent-color);
    border: 1px solid #dee2e6;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.history-item-content {
    font-size: 14px;
    white-space: pre-wrap;
    background-color: white;
    padding: 10px;
    border-radius: var(--border-radius);
    margin-top: 5px;
    border: 1px solid #dee2e6;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.spinner {
    border: 5px solid var(--secondary-color);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

@media (max-width: 600px) {
    .user-greeting {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1001;
    transform: translateX(150%);
    animation: slideIn 0.5s forwards;
    max-width: 350px;
}

.toast.hide {
    animation: slideOut 0.5s forwards;
}

.toast-error {
    border-left: 4px solid var(--error-color);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--accent-color);
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding-left: 10px;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from { transform: translateX(150%); }
    to { transform: translateX(0); }
}

@keyframes slideOut {
    from { transform: translateX(0); }
    to { transform: translateX(150%); }
}

#api-key {
    font-family: monospace;
    letter-spacing: 1px;
}

#api-key.masked {
    color: #666;
}

.response-actions {
    display: flex;
    gap: 5px;
}

.icon-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
}

.icon-button[title] {
    position: relative;
}

.invalid {
    border-color: #ff4444 !important;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2) !important;
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.notification-box {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: notificationFadeIn 0.3s ease-out;
    }

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.notification-header h3 {
    margin: 0;
    color: #2e7d32;
    font-size: 1.5rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    color: #ff4444;
}

.notification-content {
    padding: 20px;
}

.notification-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.notification-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.notification-content a {
    color: #4caf50;
    text-decoration: none;
    font-weight: 500;
}

.notification-content a:hover {
    text-decoration: underline;
}

.notification-media {
    margin: 20px 0;
    text-align: center;
}

.notification-media img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.notification-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #555;
    font-size: 0.9rem;
}

.notification-confirm {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.notification-confirm:hover {
    background-color: #3d8b40;
}

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

@media (max-width: 480px) {
    .notification-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .notification-confirm {
        width: 100%;
    }
}

.timeout-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.timeout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
}

.timeout-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.timeout-label i {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
}

.timeout-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeout-control input {
    width: 60px;
    padding: 5px;
    text-align: center;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.timeout-control span {
    font-size: 13px;
    color: var(--dark-accent);
}

.timeout-edit {
    margin-left: 5px;
    font-size: 12px !important;
}

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

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

.timeout-controls {
    display: flex;
    gap: 15px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 5px;
}

.timeout-controls:hover {
    opacity: 1;
}

.timeout-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    background-color: rgba(233, 236, 239, 0.5);
    border-radius: 15px;
    padding: 5px 10px;
    transition: all 0.2s ease;
}

.timeout-item:hover {
    background-color: var(--secondary-color);
}

.timeout-item i {
    color: var(--accent-color);
    font-size: 12px;
}

.timeout-item input {
    width: 35px;
    padding: 3px;
    text-align: center;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
}

.timeout-item span {
    color: var(--dark-accent);
    font-size: 12px;
}

.timeout-edit {
    margin-left: 2px;
    font-size: 11px !important;
    width: 22px;
    height: 22px;
}

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

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

.timeout-controls {
    display: flex;
    justify-content: space-between;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.timeout-controls:hover {
    opacity: 1;
}

.timeout-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    background-color: rgba(233, 236, 239, 0.6);
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    width: 48%;
}

.left-timeout {
    justify-content: flex-start;
    margin-right: auto;
}

.right-timeout {
    justify-content: flex-end;
    margin-left: auto;
}

.timeout-item:hover {
    background-color: var(--secondary-color);
}

.timeout-item i {
    color: var(--accent-color);
    font-size: 14px;
}

.timeout-item input {
    width: 50px;
    padding: 5px;
    text-align: center;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.timeout-item span {
    color: var(--dark-accent);
    font-size: 13px;
    white-space: nowrap;
}

.timeout-edit {
    margin-left: 3px;
    font-size: 12px !important;
    width: 24px;
    height: 24px;
}

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

/* Стили для массовой загрузки */
.toggle-section {
    margin: 20px 0;
    text-align: center;
}

.toggle-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.toggle-btn:hover {
    background-color: var(--dark-accent);
    transform: translateY(-2px);
}

.toggle-btn.hidden {
    display: none;
}

#mass-load-section {
    transition: all 0.3s ease;
}

#mass-load-section.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.mass-load-container {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.mass-load-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    resize: vertical;
    font-family: monospace;
}

.hint {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.mass-load-results {
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.mass-load-task {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.task-header {
    padding: 12px 15px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.task-status {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Стили для статусов задач */
.status-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-badge i {
    font-size: 12px;
}

.status-badge.waiting {
    background-color: #e2e3e5;
    color: #383d41;
}

.status-badge.processing {
    background-color: #cce5ff;
    color: #004085;
}

.status-badge.success {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.task-email {
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-timer {
    font-family: monospace;
    margin: 0 15px;
}

.task-actions {
    display: flex;
    gap: 5px;
}

.task-details {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.task-details:not(.hidden) {
    padding: 15px;
    max-height: 500px;
}

.task-response {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.task-actions-bottom {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

#download-all-results {
    margin-top: 20px;
}

.load-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.load-section.hidden {
    display: none;
}

.container {
    position: relative;
}

#history-container {
    margin-top: 20px;
}

.timeout-edit-mass.active {
    color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.timeout-edit-mass:hover {
    background-color: var(--secondary-color);
}

/* Tabs styles */
.tabs-container {
    margin-top: 20px;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #495057;
    background-color: #f8f9fa;
}

.tab-btn.active {
    color: #495057;
    border-bottom-color: #6c757d;
    font-weight: 500;
}

.tab-content {
    display: none;
}

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

/* History table styles */
.history-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.history-table th,
.history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.history-table th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.history-table tr:hover {
    background-color: #f8f9fa;
}

.account-type-icon {
    margin-left: 8px;
    font-size: 14px;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #495057;
    text-decoration: none;
}

.profile-link:hover {
    text-decoration: underline;
}

.cookies-btn {
    background: none;
    border: none;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cookies-btn:hover {
    background-color: #e9ecef;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.pagination-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background-color: #f8f9fa;
}

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

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.modal-body {
    padding: 20px;
}

.modal-body pre {
    white-space: pre-wrap;
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    max-height: 50vh;
    overflow: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
}

/* History section styles */
.history-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.history-table-container {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.history-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #dee2e6;
}

.history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-table tr:hover {
    background-color: #f8f9fa;
}

/* Output container styles */
.output-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Account type icons */
.account-type-icon {
    margin-left: 8px;
    font-size: 14px;
}

.account-type-icon.fa-crown {
    color: #ffc107;
}

.account-type-icon.fa-briefcase {
    color: #6c757d;
}

.account-type-icon.fa-trash-alt {
    color: #dc3545;
}

/* Profile link styles */
.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.profile-link:hover {
    color: var(--dark-accent);
    text-decoration: underline;
}

/* Cookies button styles */
.cookies-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.cookies-btn:hover {
    background-color: var(--secondary-color);
}

/* Pagination styles */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.pagination-btn:hover {
    background-color: var(--secondary-color);
}

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

.pagination-page {
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

/* Modal styles (keep existing) */
.modal {
    /* existing styles */
}

.modal-content {
    /* existing styles */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .history-table th,
    .history-table td {
        padding: 8px 10px;
        font-size: 14px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .output-container {
        gap: 5px;
    }
}

/* History Table Styles */
.history-section {
    margin-top: 20px;
}

.history-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.history-table-container {
    width: 100%;
    overflow-x: auto;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 15px;
    margin-bottom: 20px;
}

#history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px; /* Минимальная ширина для корректного отображения */
}

#history-table th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10;
}

#history-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    word-break: break-word;
}

#history-table tr:last-child td {
    border-bottom: none;
}

#history-table tr:hover td {
    background-color: #f8f9fa;
}

/* Cell-specific styles */
#history-table td:first-child {
    white-space: nowrap;
}

#history-table td:nth-child(2) {
    min-width: 200px;
}

#history-table td:nth-child(3) {
    min-width: 250px;
}

#history-table td:last-child {
    white-space: nowrap;
    text-align: center;
}

/* Output content styles */
.output-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-color);
    text-decoration: none;
}

.profile-link:hover {
    text-decoration: underline;
}

.account-type-icon {
    font-size: 14px;
}

.account-type-icon.fa-crown {
    color: #ffc107;
}

.account-type-icon.fa-briefcase {
    color: #6c757d;
}

.account-type-icon.fa-trash-alt {
    color: #dc3545;
}

.cookies-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.cookies-btn:hover {
    background-color: var(--secondary-color);
}

/* Pagination styles */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pagination-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--secondary-color);
}

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

#history-page {
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

/* History Table Improvements */
.history-row {
    font-size: 13px;
    color: #495057;
}

.history-row:hover {
    background-color: #f8f9fa !important;
}

.history-date {
    white-space: nowrap;
    padding: 8px 12px !important;
}

.history-input {
    padding: 8px 12px !important;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-output {
    padding: 8px 12px !important;
}

.history-actions {
    padding: 8px 12px !important;
    text-align: center;
}

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

.action-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    color: #495057;
}

.action-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 12px;
}

.profile-btn {
    border-color: #6c757d;
    color: #6c757d;
}

.cookies-btn {
    border-color: #6c757d;
    color: #6c757d;
}

.account-type-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 8px;
    font-family: 'Roboto Mono', monospace;
}

#history-table th {
    padding: 10px 12px !important;
    font-size: 13px;
    font-weight: 500;
    background-color: #f8f9fa !important;
}

#history-table {
    border-collapse: separate;
    border-spacing: 0;
}

#history-table tr:not(:last-child) td {
    border-bottom: 1px solid #e9ecef;
}

/* History Table Improvements */
.history-table-container {
    overflow-x: hidden !important; /* Убираем горизонтальный скролл */
    width: 100%;
}

#history-table {
    width: 100%;
    min-width: 100% !important; /* Убираем минимальную ширину */
    table-layout: fixed; /* Фиксированная ширина столбцов */
}

.history-row {
    font-size: 13px;
    color: #495057;
}

.history-row:hover {
    background-color: #f8f9fa !important;
}

.history-date {
    white-space: nowrap;
    padding: 8px 12px !important;
    width: 160px; /* Фиксированная ширина для даты */
}

.history-input {
    padding: 8px 12px !important;
    width: 25%; /* 25% ширины таблицы */
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-output {
    padding: 8px 12px !important;
    width: 45%; /* 45% ширины таблицы */
}

.history-actions {
    padding: 8px 12px !important;
    text-align: center;
    width: 80px; /* Фиксированная ширина для действий */
}

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

.action-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    color: #495057;
    white-space: nowrap;
}

.action-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 12px;
}

.profile-btn {
    border-color: #6c757d;
    color: #6c757d;
}

.cookies-btn {
    border-color: #6c757d;
    color: #6c757d;
}

.account-type-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 8px;
    font-family: 'Roboto Mono', monospace;
    display: inline-block;
    text-align: center;
}

#history-table th {
    padding: 10px 12px !important;
    font-size: 13px;
    font-weight: 500;
    background-color: #f8f9fa !important;
    position: static; /* Убираем sticky */
}

#history-table {
    border-collapse: separate;
    border-spacing: 0;
}

#history-table tr:not(:last-child) td {
    border-bottom: 1px solid #e9ecef;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .history-date {
        width: 120px;
    }

    .history-input {
        width: 20%;
    }

    .history-output {
        width: 40%;
    }

    .action-btn span {
        display: none;
    }

    .action-btn {
        padding: 5px;
    }
}

/* Стили для красивого отображения tooltip */
.history-input {
    position: relative;
    cursor: default;
}

.history-input:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: pre;
    z-index: 100;
    min-width: max-content;
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.history-input:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% - 5px);
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    z-index: 101;
}

/* Центрируем заголовки столбцов */
#history-table th {
    text-align: center !important;
    padding: 10px 12px !important;
    font-size: 13px;
    font-weight: 500;
    background-color: #f8f9fa !important;
}

/* Центрируем содержимое ячеек (кроме output) */
#history-table td.history-date,
#history-table td.history-actions {
    text-align: center;
}

#history-table td.history-input {
    text-align: left;
}

#history-table td.history-output {
    text-align: left;
}

.history-output .action-buttons {
    justify-content: center;
}

.payment-section {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 500px;
    margin: 0 auto;
}

.payment-summary {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.summary-row:last-child {
    margin-bottom: 0;
    font-weight: 500;
    font-size: 18px;
}

.telegram-btn {
    background-color: #0088cc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

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

#payment-instructions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#payment-instructions ol {
    margin: 15px 0;
    padding-left: 20px;
}

#payment-instructions li {
    margin-bottom: 8px;
}

#telegram-pay-link {
    background-color: #0088cc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    text-decoration: none !important;
    padding: 12px 20px;
}

#telegram-pay-link:hover {
    background-color: #0077b3;
    text-decoration: none !important;
}

#check-payment {
    margin-top: 0;
    padding: 12px 20px;
}

.submit-btn {
    padding: 12px 20px;
    box-sizing: border-box;
    height: auto;
    line-height: 1.5;
}

/* Thread control styles */
.thread-control {
    margin: 20px 0;
}

.thread-control label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.slider-container {
    position: relative;
    padding: 15px 0;
}

#thread-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e9ecef;
    border-radius: 4px;
    outline: none;
    margin: 0;
}

#thread-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

#thread-slider::-webkit-slider-thumb:hover {
    background: var(--dark-accent);
    transform: scale(1.1);
}

.slider-ticks {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
}

.slider-ticks::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    border-radius: 4px;
}

/* Thread indicators */
.thread-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    background-color: var(--secondary-color);
}

.thread-indicator.active {
    background-color: var(--success-color);
}

/* Disabled state */
.disabled-section {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.disabled-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    z-index: 10;
}

.disabled-overlay i {
    font-size: 40px;
    color: var(--error-color);
    margin-bottom: 15px;
}

/* Стили для управления потоками */
.thread-control {
    margin: 25px 0;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.thread-control label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--dark-accent);
    font-size: 15px;
}

.thread-control label span {
    font-weight: 600;
    color: var(--accent-color);
}

.slider-container {
    position: relative;
    padding: 20px 0;
}

/* Стилизация основного трека слайдера */
#thread-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--secondary-color) 0%);
    outline: none;
    transition: background 0.3s;
}

/* Стилизация "ползунка" слайдера */
#thread-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#thread-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

#thread-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Анимация заполнения трека */
#thread-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--secondary-color) 0%);
}

/* Деления на слайдере */
.slider-marks {
    display: flex;
    justify-content: space-between;
    position: relative;
    top: -10px;
    pointer-events: none;
}

.slider-mark {
    width: 2px;
    height: 10px;
    background-color: var(--secondary-color);
    position: relative;
}

.slider-mark::after {
    content: attr(data-value);
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--dark-accent);
}

/* Индикаторы потоков */
.thread-indicators {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(233, 236, 239, 0.5);
    border-radius: var(--border-radius);
}

.thread-indicator {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.thread-indicator.active {
    background-color: var(--success-color);
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.thread-indicator::after {
    content: attr(data-thread);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: bold;
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.thread-indicator:hover::after {
    opacity: 1;
}

.thread-control {
    margin: 20px auto;
    max-width: 300px;
    text-align: center;
}

.thread-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.thread-control label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.slider-container {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
}

#thread-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    outline: none;
    margin: 0;
    padding: 0;
}

#thread-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--dark-accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

#thread-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(74, 107, 255, 0.2);
}

#thread-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--dark-accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

#thread-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(74, 107, 255, 0.2);
}

/* For small max values (1-5) make the slider shorter */
.thread-control.small-range {
    max-width: 800px;
}

/* For medium max values (6-15) */
.thread-control.medium-range {
    max-width: 800px;
}

/* For large max values (16+) */
.thread-control.large-range {
    max-width: 800px;
}

/* Обновленные стили для управления потоками */
.thread-control {
    background-color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 15px 0;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.thread-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.thread-slider-wrapper label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-accent);
    white-space: nowrap;
    margin: 0;
}

.slider-container {
    flex: 1;
    min-width: 120px;
    padding: 5px 0;
}

#thread-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    outline: none;
    transition: background 0.2s;
}

#thread-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#thread-slider::-webkit-slider-thumb:hover {
    background: var(--dark-accent);
    transform: scale(1.1);
}

#thread-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#thread-slider::-moz-range-thumb:hover {
    background: var(--dark-accent);
    transform: scale(1.1);
}

/* Для плавного перемещения */
#thread-slider {
    transition: all 0.3s ease;
}

/* Обновленные стили для слайдера */
.thread-control {
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.thread-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-container {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    padding: 10px 0;
}

#thread-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin: 0;
    padding: 0;
    outline: none;
}

/* Стили для ползунка в Chrome/Safari */
#thread-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    margin-top: -7px; /* Выравнивание по вертикали */
    position: relative;
    z-index: 2;
}

#thread-slider::-webkit-slider-thumb:hover {
    background: var(--dark-accent);
    transform: scale(1.1);
}

/* Стили для ползунка в Firefox */
#thread-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#thread-slider::-moz-range-thumb:hover {
    background: var(--dark-accent);
    transform: scale(1.1);
}

/* Стили для трека в Firefox */
#thread-slider::-moz-range-track {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    border: none;
}

/* Добавим линию активной зоны */
#thread-slider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    /*width: calc(var(--value) * 1%);*/
    pointer-events: none;
}

/* Стили для label */
.thread-slider-wrapper label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-accent);
    text-align: center;
}

#thread-count {
    font-weight: 600;
    color: var(--accent-color);
}

#max-threads {
    font-weight: 500;
    color: var(--dark-accent);
}

/*.thread-control *,*/
/*.thread-control *::before,*/
/*.thread-control *::after {*/
/*    box-sizing: border-box;*/
/*}*/