* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #0e0e0e;
    color: #e0e0e0;
}

/* Header styles */
.header {
    background-color: #101010;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
}

.header-buttons {
    display: flex;
    gap: 1rem;
}

/* Button styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    text-decoration: none !important;
    display: inline-block;
}

.menu-button {
    background-color: #101010;
    color: white;
    border: 1px solid #3d3d3d;
    padding: 14px 1%;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.menu-button:hover {
    background-color: #1d1d1d;
}

.btn-primary {
    background-color: #101010;
    color: white;
    border: 1px solid #3d3d3d;
}

.btn-primary:hover {
    background-color: #1d1d1d;
}

.btn-saving {
    background-color: #101010;
    color: white;
    border: 1px solid #3d3d3d;
    padding: 14px 44%;
    border-radius: 6px;
    cursor: pointer;
}

.btn-saving:hover {
    background-color: #1d1d1d;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}



.btn-warning {
    background-color: #1d1d1d;
    color: white;
}

.btn-dr {
    background-color: #8e44ad;
    color: white;
}



.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Main content */
.main-content {
    padding: 2rem;
}

/* Reports list */
.reports-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Кликабельные карточки отчетов */
.report-card {
    background-color: #0f0f0f;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.report-card:hover {
    border: 1px solid hsla(0, 0%, 100%, .1);
    box-shadow: 0 4px 15px rgb(8 8 8 / 20%);
}

.report-card h3 {
    margin-bottom: 0.5rem;
    color: #fff;
    flex-grow: 0;
}

.report-card p {
    color: #919191;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.report-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    flex-grow: 0;
    position: relative;
    z-index: 2;
}

/* Скрываем стандартную кнопку "Открыть" */
.report-card .btn-primary {
    visibility: hidden;
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.delete-btn {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    text-decoration: none;
    z-index: 3;
    position: relative;
    padding: 0.5rem;
}

.delete-btn:hover {
    color: #c0392b;
    transform: scale(1.1);
}

/* Table container */
.table-container {
    background-color: #0f0f0f;
    border-radius: 8px;
    border: 1px solid hsla(0, 0%, 100%, .1);
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
    overflow-x: auto;
}

/* Statistics */
.stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    background-color: #0f0f0f;
    padding: 1rem;
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
    border: 1px solid hsla(0, 0%, 100%, .1);
}

.stat-item h4 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

.stat-value2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f44336;
}

.stat-value3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4caf50;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid hsla(0, 0%, 100%, .1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: center;
}

th {
    font-weight: bold;
    color: #fff;
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid hsla(0, 0%, 100%, .1);
}

/* Особый стиль для заголовка "ДЕЙСТВИЯ" */
th:last-child {
    text-align: center !important;
}

/* Для DR и LINK TYPE также центрируем заголовки */
th:nth-child(6) { /* DR */
    text-align: center;
}

th:nth-child(7) { /* LINK TYPE */
    text-align: center;
}



/* Column widths */
th:nth-child(1), td:nth-child(1) { width: 15%; } /* LINK */
th:nth-child(2), td:nth-child(2) { width: 25%; } /* PLACED COMMENT TEXT */
th:nth-child(3), td:nth-child(3) { width: 10%; } /* ACC NAME */
th:nth-child(4), td:nth-child(4) { width: 15%; } /* REF URL */
th:nth-child(5), td:nth-child(5) { width: 10%; } /* ANCHOR */
th:nth-child(6), td:nth-child(6) { width: 5%; }  /* DR */
th:nth-child(7), td:nth-child(7) { width: 8%; }  /* LINK TYPE */
th:nth-child(8), td:nth-child(8) { width: 12%; } /* ДЕЙСТВИЯ */

/* Центрируем содержимое для DR и LINK TYPE */
td:nth-child(6) { /* DR */
    text-align: center;
    vertical-align: center;
}

td:nth-child(7) { /* LINK TYPE */
    text-align: center;
    vertical-align: center;
}

/* Ячейки действий */
td:last-child {
    text-align: center;
    vertical-align: middle !important;
}

/* Action buttons */
.action-buttons {
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 40px;
}

.action-btn {
    padding: 0.6rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    text-decoration: none !important;
    flex-shrink: 0;
}

.action-btn2 {
    padding: 0.6rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    text-decoration: none !important;
    flex-shrink: 0;
}

/* Text handling */
td {
    white-space: normal;
    max-width: 0;
}

/* Comment text scroll */
td:nth-child(2) {
    max-height: 120px;
    overflow-y: auto;
}

td:nth-child(2)::-webkit-scrollbar {
    width: 6px;
}

td:nth-child(2)::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

td:nth-child(2)::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

td:nth-child(2)::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Fixed buttons */
.fixed-buttons {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.fixed-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    text-decoration: none !important;
}

.btn-to-top {
    background-color: #f4f4f5;
    color: #18181b;
}

.btn-add {
    background-color: #18181b;
    color: white;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #171717f2;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #e74c3c;
}

.close:hover {
    color: #e74c3c;
}

/* Compact form styles - Flexbox version */
.compact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 25px;
}

.form-row-full .form-group {
    width: 100%;
    margin-bottom: 0;
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #aaa;
}

.form-control {
    background-color: #181818;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    height: 100%;
    position: relative;
    transition: .2s ease;
    transition-property: background-color, border-color;
    width: 97%;
    color: #ffffff;
    padding-left: 10px;
    padding-top: 0;
    padding-bottom: 0.0em;
    padding-right: 0.0em;
}

.form-control:focus {
    outline: none;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    overflow: hidden;
    width: 98%;
    padding-bottom: 10px;
    padding-top: 10px;
}



.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Login styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #0e0e0e;
}

.login-form {
    background-color: #0f0f0f;
    border: 1px solid hsla(0, 0%, 100%, .1);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

/* Links and text decoration */
a {
    text-decoration: none !important;
}

.btn, .action-btn, .fixed-btn, .report-card a, .header a {
    text-decoration: none !important;
}

a:hover, .btn:hover, .action-btn:hover {
    text-decoration: none !important;
}

.action-buttons a {
    text-decoration: none !important;
    display: inline-block;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .stat-item {
        min-width: 100%;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .reports-list {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
    }
    
    .fixed-buttons {
        bottom: 1rem;
        left: 1rem;
    }
    
    .fixed-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Disabled select options */
select option:disabled {
    color: #bdc3c7;
    background-color: #ecf0f1;
    font-style: italic;
}

/* Убедимся, что grid работает правильно */
.reports-list > * {
    min-width: 0;
}

/* Просто цвет текста */
td[data-link-type="Nofollow"] {
    color: #f44336;
}

td[data-link-type="Dofollow"] {
    color: #4caf50;
}

/* Простой разделитель на всю ширину */
select option[disabled] {
    color: #2e2e2e;
    background-color: transparent !important;
    height: 25px;
    padding: 0;
    margin: 1px 0;
    border: none;
    border-top: 1px solid #2e2e2e;
    background: linear-gradient(to right, transparent 0%, #2e2e2e 50%, transparent 100%);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Убираем ползунок из выпадающих списков */
select.form-control {
    overflow: hidden !important;
}

select.form-control::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

select.form-control {
    -ms-overflow-style: none !important;  /* IE и Edge */
    scrollbar-width: none !important;     /* Firefox */
}

/* Убираем стрелки у number input */
input[type="number"].form-control::-webkit-outer-spin-button,
input[type="number"].form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"].form-control {
    -moz-appearance: textfield; /* Firefox */
}

/* Стили для модальных окон */
.modal2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Увеличиваем z-index */
}

.modal-content2 {
    background-color: #171717;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid hsla(0, 0%, 100%, .1);
    z-index: 10001; /* Увеличиваем z-index */
    position: relative;
}

/* Стили для генератора прокси */
.proxy-content {
    padding: 1rem 0;
}

.region-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.region-btn {
    padding: 1.5rem 1rem;
    border: 1px solid hsla(0, 0%, 100%, .1);
    border-radius: 8px;
    background-color: #0f0f0f;
    color: #fff;
    cursor: pointer;
    text-align: center;
}

.region-btn:hover {
    border: 1px solid hsla(0, 0%, 100%, .1);
    box-shadow: 0 4px 15px rgb(8 8 8 / 20%);
}

.region-btn strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.region-btn small {
    color: #919191;
    font-size: 0.8rem;
}

/* Стили для полей прокси */
.proxy-fields {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.proxy-fields .form-group {
    margin-bottom: 0;
}

.proxy-fields label {
    display: block;
    margin-bottom: 0.3rem;
    color: #919191;
    font-size: 0.9rem;
}

.proxy-fields .form-control {
    background-color: #0f0f0f;
    border: 1px solid hsla(0, 0%, 100%, .1);
    color: #fff;
    padding: 0.6rem;
    border-radius: 6px;
    width: 100%;
    font-family: monospace;
}

.proxy-fields .form-control:read-only {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.proxy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
}

/* Стили для кнопок копирования */
#copy-all-proxy1 {
    background-color: #3498db;
    border: none;
}

#copy-ip-port, #copy-auth {
    background-color: #555;
    border: none;
    font-size: 0.9rem;
    padding: 0.5rem;
}

#copy-ip-port:hover, #copy-auth:hover {
    background-color: #666;
}

/* Стили для поля страны с флагом */
.country-field {
    position: relative;
}

.country-flag {
    position: absolute;
    right: 37%;
    top: 76.5%;
    transform: translateY(-50%);
    width: 20px;
    height: 15px;
    background-size: cover;
    pointer-events: none;
}

.country-flag svg {
    width: 100%;
    height: 100%;
}

/* Увеличиваем правый отступ для input */
#proxy-country {
    padding-right: 40px !important;
}

/* Стили для SVG флагов */
.flag-icon {
    width: 20px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

/* Стили для кнопки волшебной палочки */
.btn-magic {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-magic:hover {
    background: linear-gradient(45deg, #7d3c98, #8e44ad);
    transform: translateY(-1px);
}

.btn-magic:active {
    transform: translateY(0);
}

/* Иконка волшебной палочки */
.lucide-wand-sparkles {
    width: 12px;
    height: 12px;
}

/* Profile */
/* Стили для страницы профиля */
.profile-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.card-header svg {
    margin-right: 12px;
    color: #007bff;
}

.card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.card-content {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.status-active {
    color: #28a745;
    font-weight: 600;
    padding: 4px 8px;
    background: #d4edda;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Статистика */
.stat-block {
    text-align: center;
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Мини-список отчетов */
.reports-list-mini {
    max-height: 200px;
    overflow-y: auto;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.report-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.report-date {
    color: #666;
    font-size: 0.85em;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.8em;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-small:hover {
    background: #0056b3;
}

/* Список действий */
.actions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-full {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 20px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-cards {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .report-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .profile-cards {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2em;
    }
}

/* Ежедневные задания */
.quests-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.quest-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quest-header h5 {
    margin: 0;
    color: #333;
    font-size: 1.1em;
}

.quest-reward {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.quest-description {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.95em;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.progress-bar {
    flex-grow: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9em;
    color: #666;
    min-width: 60px;
}

.quest-time {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 8px;
}

.quest-completed {
    color: #28a745;
    font-weight: bold;
    font-size: 0.9em;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8em;
}