/* Стили для страницы задний */

/* Секция с заданиями */
.tasks-section {
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

/* Одинаковое оформление для всех заголовков секций */
.card h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
    text-align: center;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color-light), var(--primary-color));
    border-radius: 2px;
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Карточки заданий */
.task-card {
  background-color: var(--dark-card);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(156, 163, 175, 0.2) #3a3a3a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
}

#tasks-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  #tasks-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  #tasks-container {
    grid-template-columns: 1fr;
  }
}

.task-card-channel-info {
  flex: 1;
  min-width: 0;
}

.task-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.channel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-right: 15px;
    flex-shrink: 0;
    overflow: hidden;
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.task-details {
    flex: 1;
}

.task-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.task-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.task-reward {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: var(--success-color);
}

.reward-icon {
    margin-right: 5px;
}

.task-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Руководство по заданиям */
.tasks-guide {
    margin-bottom: 30px;
    padding: 25px;
}

.guide-steps {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.guide-steps li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    position: relative;
    margin-right: 15px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.step-number:before {
    content: attr(data-number);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 16px;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin-top: 0;
    margin-bottom: 5px;
}

.step-content p {
    color: var(--text-secondary);
    margin: 0;
}

.guide-warning {
    background-color: var(--warning-bg);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    margin-top: 20px;
}

.guide-warning svg {
    color: var(--warning-color);
    margin-right: 10px;
    flex-shrink: 0;
}

.guide-warning p {
    margin: 0;
    font-size: 14px;
}

/* Завершенные задания */
.completed-tasks {
    margin-bottom: 30px;
}

.completed-task-card {
    opacity: 0.8;
}

.completed-task-status {
    background-color: var(--success-color);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 10px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    border-radius: 12px;
    border: 1px solid rgba(156, 163, 175, 0.2) var(--card-border);
    box-shadow: 6px 6px 0 var(--card-shadow);
    width: 90%;
    max-width: 500px;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-30px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 15px;
}

.close-modal:hover {
    color: var(--text-color);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 700;
}

.modal-body {
    padding: 20px;
}

#subscription-details {
    text-align: center;
}

#channel-info {
    margin-bottom: 20px;
}

#channel-title {
    margin: 10px 0;
}

#channel-description {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.subscription-reward {
    background-color: var(--success-bg);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reward-title {
    font-weight: bold;
}

.reward-points {
    font-size: 18px;
    font-weight: bold;
    color: var(--success-color);
}

.subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.subscription-actions .btn {
    width: 100%;
}

/* Результаты проверки */
#verification-result {
    text-align: center;
    padding: 20px 0;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.result-icon.success {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.result-icon.error {
    background-color: var(--error-bg);
    color: var(--error-color);
}

/* Сообщение о отсутствии заданий */
.no-tasks-message {
    text-align: center;
    padding: 40px 20px;
}

.message-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.no-tasks-message h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
}

.no-tasks-message p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Заставка загрузки */
.tasks-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(var(--primary-rgb), 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinner 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spinner {
    to {transform: rotate(360deg);}
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .task-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-info {
        margin-bottom: 15px;
        width: 100%;
    }

    .task-actions {
        flex-direction: row;
        width: 100%;
    }

    .task-actions .btn {
        flex: 1;
    }
}