.ktp-container {
    background: #020617;
    border-radius: 16px;
    border: 1px solid #1f2933;
    padding: 16px 20px;
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ktp-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    align-items: center;
}

.ktp-title {
    font-size: 18px;
    font-weight: 600;
}

.ktp-subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 4px;
}

.ktp-header-right {
    text-align: right;
}

.ktp-balance-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
}

.ktp-balance-value {
    font-size: 20px;
    font-weight: 600;
    margin-top: 2px;
}

.ktp-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.ktp-card {
    background: #020617;
    border-radius: 12px;
    border: 1px solid #1f2933;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ktp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

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

.ktp-card-price {
    font-size: 16px;
    font-weight: 600;
}

.ktp-rub {
    font-size: 13px;
    opacity: 0.9;
}

.ktp-card-body {
    margin-top: 8px;
    font-size: 13px;
    color: #d1d5db;
}

.ktp-card-tokens {
    font-weight: 500;
    margin-bottom: 4px;
}

.ktp-card-note {
    font-size: 12px;
    color: #9ca3af;
}

.ktp-card-footer {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ktp-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.ktp-btn--primary {
    background-color: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.ktp-btn--primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.ktp-btn--ghost {
    background-color: transparent;
    color: #e5e7eb;
    border-color: #4b5563;
}

.ktp-btn--ghost:hover {
    border-color: #9ca3af;
}

.ktp-footer-note {
    margin-top: 12px;
    font-size: 12px;
    color: #9ca3af;
}

.ktp-status {
    margin-top: 8px;
    font-size: 13px;
}

.ktp-status--hidden {
    display: none;
}

.ktp-message {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.ktp-message--warning {
    background: #fef3c7;
    color: #92400e;
}

@media (max-width: 1024px) {
    .ktp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ktp-container {
        padding: 12px;
    }
    .ktp-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ktp-header-right {
        text-align: left;
    }
    .ktp-grid {
        grid-template-columns: 1fr;
    }
}


/* ===================== TRAINING CENTER LAYOUT ===================== */

#training-center {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 20px;
}

#training-center .training-left {
    flex: 2 1 60%;
    min-width: 0;
}

#training-center .training-right {
    flex: 1 1 35%;
    min-width: 0;
    max-height: 80vh;
    overflow-y: auto;
}


/* ===================== TRAINING VIDEO PLAYER ===================== */

.training-video-player {
    background: radial-gradient(circle at top left, #1f2937, #020617);
    border-radius: 16px;
    border: 1px solid #1f2933;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.training-video-frame {
    position: relative;
    background: #000;
}

.training-video {
    width: 100%;
    max-height: 480px;
    display: block;
    object-fit: cover;
    background: #000;
}

.training-video-bigplay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.96));
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.training-video-bigplay:hover {
    transform: scale(1.02);
}

.training-video-bigplay-icon {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 2px solid rgba(248, 250, 252, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.training-video-bigplay-icon::before {
    content: '';
    position: relative;
    left: 2px;
    border-style: solid;
    border-width: 14px 0 14px 24px;
    border-color: transparent transparent transparent #f9fafb;
}

.training-video-bigplay.playing {
    opacity: 0;
    pointer-events: none;
}

.training-video-info {
    padding: 14px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.training-video-title {
    font-size: 15px;
    font-weight: 600;
    color: #f9fafb;
}

.training-video-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

/* На мобильных убираем часть тени, чтобы не выбиваться из потока */
@media (max-width: 640px) {
    .training-video-player {
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
        border-radius: 14px;
    }
}


.training-video-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
}

.training-video-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
}

.training-video-badge--current {
    border-color: rgba(56, 189, 248, 0.85);
}

.training-video-badge--current::before {
    background: #38bdf8;
}

.training-video-badge--done {
    border-color: rgba(34, 197, 94, 0.85);
}

.training-video-badge--done::before {
    background: #22c55e;
}

@media (max-width: 640px) {
    .training-video-badge {
        top: 10px;
        left: 10px;
        font-size: 10px;
        padding: 3px 8px;
    }
}

#training-video-wrapper video,
#training-video-wrapper iframe {
    width: 100%;
    height: auto;
    display: block;
}

#training-quiz-wrapper {
    margin-top: 20px;
}

/* Lessons list */
.training-lessons-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.training-lessons-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.training-lessons-list .training-lesson-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 6px;
    border: 1px solid #1f2933;
    font-size: 14px;
    background: #020617;
    color: #e5e7eb;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.training-lessons-list .training-lesson-item:hover {
    border-color: #4b5563;
    background: #030712;
}

.training-lessons-list .training-lesson-item.current {
    background-color: #0f172a;
    border-color: #2563eb;
    color: #e5e7eb;
    font-weight: 600;
}

.training-lessons-list .training-lesson-item.completed {
    opacity: 0.7;
}

/* Quiz layout */
.training-quiz-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.training-quiz-question {
    font-size: 14px;
}

.training-quiz-question-text {
    font-weight: 500;
    margin-bottom: 4px;
}

.training-quiz-option {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.training-quiz-option input[type="radio"] {
    margin-right: 6px;
}

.training-quiz-status {
    margin-top: 10px;
    font-size: 14px;
}

/* Quiz button */
#training-quiz-wrapper button,
#training-quiz-wrapper .training-quiz-submit {
    background-color: #0073e6 !important;
    color: #ffffff !important;
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#training-quiz-wrapper button:hover,
#training-quiz-wrapper .training-quiz-submit:hover {
    background-color: #005bb8 !important;
}

/* Responsive */
@media (max-width: 768px) {
    #training-center {
        flex-direction: column;
    }

    #training-center .training-right {
        max-height: none;
        width: 100%;
        order: -1;
    }
}

/* ===================== TRAINING PROGRESS ===================== */

.training-progress {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #020617;
    border: 1px solid #1f2933;
}

.training-progress-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.training-progress-bar {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #111827;
    overflow: hidden;
    margin-bottom: 8px;
}

.training-progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.3s ease;
}

.training-progress-text {
    font-size: 13px;
    color: #e5e7eb;
}

.training-progress-completed {
    margin-top: 8px;
    font-size: 14px;
    color: #22c55e;
    font-weight: 600;
}

/* недоступные (будущие) уроки */
.training-lessons-list .training-lesson-item.locked {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}


