/* Skeleton Loader */
.skeleton-text {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 1.2em;
    margin-bottom: 0.5em;
    opacity: 0.7;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

:root {
    /* Telegram Theme → Fallback Dark Theme */
    --bg-color: var(--tg-theme-bg-color, #0f172a);
    --text-color: var(--tg-theme-text-color, #f1f5f9);
    --primary-color: var(--tg-theme-button-color, #3b82f6);
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color), #000 20%) 100%);
    --secondary-bg: var(--tg-theme-secondary-bg-color, #1e293b);
    --card-bg: var(--tg-theme-secondary-bg-color, rgba(30, 41, 59, 0.7));
    --hint-color: var(--tg-theme-hint-color, #94a3b8);
    --link-color: var(--tg-theme-link-color, #3b82f6);
    --btn-text-color: var(--tg-theme-button-text-color, #ffffff);
    --glass-border: 1px solid rgba(128, 128, 128, 0.15);
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --processing-color: #eab308;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-full: 24px;

    /* Profile Redesign Tokens */
    --profile-accent: #6366f1;
    --profile-accent-glow: rgba(99, 102, 241, 0.4);
    --profile-glass-bg: rgba(255, 255, 255, 0.04);
    --profile-glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --profile-premium-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

* {
    box-sizing: border-box;
}

/* --- VIEW TRANSITION SYSTEM --- */
#listView,
#detailView {
    will-change: transform, opacity;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    opacity: 1;
}

#listView.view-exit {
    transform: translateX(-30px);
    opacity: 0;
    pointer-events: none;
}

#detailView.view-exit {
    transform: translateX(30px);
    opacity: 0;
    pointer-events: none;
}

#listView.view-enter {
    animation: slideFromLeft 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#detailView.view-enter {
    animation: slideFromRight 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideFromLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideFromRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- PAGE EXIT ANIMATION --- */
body.page-exit {
    animation: pageExit 0.2s ease-in forwards;
    pointer-events: none;
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* PROFILE REDESIGN CORE */
.profile-container {
    padding: 0 4px 100px 4px;
    /* Space for bottom content */
    animation: fadeInContainer 0.4s ease-out;
}

@keyframes fadeInContainer {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-section {
    margin-bottom: 24px;
    opacity: 0;
    animation: slideUpSection 0.5s ease-out forwards;
}

.profile-section:nth-child(1) {
    animation-delay: 0.1s;
}

.profile-section:nth-child(2) {
    animation-delay: 0.2s;
}

.profile-section:nth-child(3) {
    animation-delay: 0.3s;
}

.profile-section:nth-child(4) {
    animation-delay: 0.4s;
}

.profile-section:nth-child(n+5) {
    animation-delay: 0.5s;
}

@keyframes slideUpSection {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    background: var(--profile-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--profile-glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-card:active {
    transform: scale(0.99);
}

.section-label {
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hint-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

h2,
h3 {
    text-align: center;
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 small {
    display: block;
    margin-top: 5px;
    opacity: 0.7;
    font-weight: 400;
}

/* Main Header with Profile Button */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.main-header h2 {
    margin: 0;
}

.profile-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: white;
}

.profile-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.profile-btn:active {
    transform: scale(0.95);
}

.profile-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* NEW PROFILE HEADER */
.profile-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
    padding-top: 20px;
}


/* PREMIUM CARD */
.premium-accent {
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.08);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.plan-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.plan-badge {
    padding: 6px 14px;
    background: var(--profile-premium-gradient);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
}

.plan-expiry-tag {
    font-size: 0.75em;
    color: var(--hint-color);
    margin-top: 6px;
}

.upgrade-action-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.upgrade-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 20px 0;
}

/* LIMITS UI */
.limits-engagement {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.limits-header-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--hint-color);
}

.limits-progress-wrapper {
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    overflow: hidden;
}

.limits-progress-bar {
    height: 100%;
    background: var(--profile-premium-gradient);
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.limits-footer-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    font-weight: 600;
}

.highlight {
    color: var(--success-color);
}

/* LANGUAGE CONTROL */
.language-segment-control {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.segment-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 600;
    z-index: 1;
    cursor: pointer;
    transition: color 0.3s;
    color: var(--hint-color);
}

.segment-option.active {
    color: white;
}

.segment-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#profileView[data-lang="en"] .segment-slider {
    transform: translateX(100%);
}

/* REFERRAL HERO */
.referral-hero {
    border-top: 3px solid #f97316;
}

.referral-stats-mini {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.mini-stat {
    flex: 1;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.mini-val {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
}

.mini-lbl {
    font-size: 0.7em;
    color: var(--hint-color);
    text-transform: uppercase;
}

.referral-actions-grid {
    display: flex;
    gap: 10px;
}

.referral-main-btn {
    flex: 1;
    background: var(--profile-accent);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
}

.referral-copy-btn {
    width: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    cursor: pointer;
}

/* KEY INPUT MODERN */
.key-input-wrapper {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.key-input-modern {
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    flex: 1;
    font-family: monospace;
    font-size: 1.1em;
}

.key-submit-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* FOOTER CARD */
.support-footer-card {
    padding: 10px !important;
}

.footer-row {
    display: flex;
    gap: 10px;
}

.footer-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    padding: 14px;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* FAQ ACCORDION */
.faq-accordion .faq-item {
    margin-bottom: 8px;
}

.faq-accordion summary {
    background: rgba(255, 255, 255, 0.04);
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    font-weight: 500;
}

.faq-accordion summary::-webkit-details-marker {
    display: none;
}

.faq-accordion .chevron {
    font-size: 0.7em;
    opacity: 0.5;
    transition: transform 0.3s;
}

.faq-accordion details[open] .chevron {
    transform: rotate(180deg);
}

.faq-accordion .faq-answer {
    padding: 14px 16px;
    color: var(--hint-color);
    font-size: 0.85em;
    line-height: 1.5;
}

/* HISTORY MODERN */
.history-details-modern summary {
    text-align: center;
    color: var(--hint-color);
    font-size: 0.9em;
    cursor: pointer;
    list-style: none;
    padding: 10px;
}

.history-details-modern summary .chevron {
    font-size: 0.7em;
    margin-left: 5px;
}

/* Remove unused usage container styles if needed, but keeping for now if they are used elsewhere */


/* Glassmorphism Cards */
.recording-item,
.detail-card,
.glass-panel {
    background: var(--tg-theme-secondary-bg-color, var(--card-bg));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
    overflow: hidden;
}

.recording-item {
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    /* Stagger-анимация при появлении */
    opacity: 0;
    animation: cardFadeIn 0.3s ease-out forwards;
}

.recording-item:nth-child(1) {
    animation-delay: 0.03s;
}

.recording-item:nth-child(2) {
    animation-delay: 0.06s;
}

.recording-item:nth-child(3) {
    animation-delay: 0.09s;
}

.recording-item:nth-child(4) {
    animation-delay: 0.12s;
}

.recording-item:nth-child(5) {
    animation-delay: 0.15s;
}

.recording-item:nth-child(n+6) {
    animation-delay: 0.18s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recording-item:active {
    transform: scale(0.97);
    transition: transform 0.1s ease-out;
}

.detail-card {
    padding: 24px;
    margin-bottom: 24px;
}

.result-empty-card {
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.result-empty-card .section-title {
    text-align: center;
    color: var(--hint-color);
    margin-bottom: 15px;
}

/* Premium Buttons с Ripple-эффектом */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    margin: 12px 0;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out, box-shadow 0.15s ease-out;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Ripple-эффект (CSS-only) */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.5s ease-out, height 0.5s ease-out, opacity 0.4s ease-out;
}

.btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
    transition: 0s;
}

.btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.btn-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    will-change: transform;
}

.btn-primary {
    background: var(--tg-theme-button-color, var(--primary-gradient));
    color: var(--tg-theme-button-text-color, #fff);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--tg-theme-text-color, inherit);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--tg-theme-hint-color, rgba(255, 255, 255, 0.2));
    color: var(--tg-theme-hint-color, inherit);
}

/* Usage Bar */
.usage-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.usage-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    padding: 0 8px 4px 8px;
    color: rgba(255, 255, 255, 0.6);
}

.usage-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease-out;
    /* Smoother transition */
    min-width: 5px;
    /* Ensure it's always slightly visible if > 0 */
}

/* Premium Transcribe Button */
.btn-premium {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 18px;
    width: 100%;
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-premium:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-premium:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.usage-bar-fill.danger {
    background: var(--danger-color);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.pro-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

.hidden {
    display: none !important;
}

/* Анимированное скрытие для view-элементов (используется JS) */
.view-hidden {
    display: none !important;
}

/* --- ПУЛЬСАЦИЯ КНОПКИ ЗАПИСИ --- */
.btn-danger.recording-active {
    animation: recordPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

@keyframes recordPulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.6), 0 0 60px rgba(239, 68, 68, 0.2);
    }
}

/* --- ПЛАВНОЕ ПОЯВЛЕНИЕ RECORDING UI --- */
#recordingUI {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

#recordingUI:not(.hidden) {
    animation: recUIEnter 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes recUIEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-done {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.status-processing {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.status-uploaded {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Loader */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

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

.loader,
.status-spinner-only {
    will-change: transform;
}

/* Indeterminate Loader (Shimmer) */
.loader-indeterminate {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite, pulse-shadow 2s infinite ease-in-out;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

@keyframes pulse-shadow {
    0% {
        box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
    }

    100% {
        box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    }
}

/* Clean Delete Button */
.btn-delete-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 24px;
    padding: 14px 16px;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-delete-action:active {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(0.98);
}

.delete-icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* List Delete Button */
.delete-btn-list {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn-list:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

/* Title Editing */
.detail-header-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.detail-title {
    margin: 0;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.title-edit-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    width: 100%;
}

.title-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    max-width: 250px;
    text-align: center;
}

.title-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.save-btn,
.cancel-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.list-edit-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 4px;
    margin-left: 4px;
    border-radius: 4px;
    transition: color 0.2s;
}

.list-edit-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.cancel-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Transcript Copy Button */
.transcript-copy-btn {
    background: transparent;
    border: none;
    color: var(--hint-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    /* Push to right if in flex container */
    pointer-events: auto;
    /* Ensure clickable */
}

.transcript-copy-btn:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.transcript-copy-btn:active {
    transform: scale(0.95);
}

/* --- NEW: Circular Progress & Status Styles --- */

#status {
    position: relative;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    min-height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Hide original loader completely if we reuse the ID */
#status.loader {
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
    margin: 20px 0;
    animation: none;
}

/* Override loader styles specifically for #status so old class doesn't break things */
.status-spinner-only {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 18px;
    /* space between spinner and text */
}

/* Progress Container */
.progress-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.05);
    /* Track */
}

.progress-ring-fill {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    /* We'll use conic-gradient via inline style */
    mask: radial-gradient(transparent 58%, #000 60%);
    -webkit-mask: radial-gradient(transparent 58%, #000 60%);
}

.progress-text-center {
    position: relative;
    z-index: 2;
    font-size: 0.9em;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.status-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

.status-error-box {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9em;
    width: 100%;
    max-width: 300px;
}


/* --- PREMIUM PLAYER UI (v2) --- */
.custom-player {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.custom-player:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
}

.play-pause-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    /* Squircle style */
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.play-pause-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.player-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-color);
    opacity: 0.9;
}

/* Improved Scrubber */
.player-progress-container {
    height: 12px;
    /* Taller for easier touch */
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    overflow: visible;
    /* Allow thumb to overflow if needed, but usually inside */
    margin-top: 5px;
    touch-action: none;
    /* Prevent scroll while dragging */
}

.player-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    pointer-events: none;
    /* Let clicks pass to container */
}

.player-progress-thumb {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.1s;
    z-index: 2;
}

.player-progress-container:active .player-progress-thumb {
    transform: translate(-50%, -50%) scale(1.2);
}

.player-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.player-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.player-action-btn:active {
    transform: scale(0.95);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.2);
    pointer-events: none;
}

/* --- PROFILE & PRICING (SPA MERGED) --- */

.profile-container,
.pricing-screen {
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.profile-header,
.pricing-header {
    margin-bottom: 24px;
    text-align: center;
}

.profile-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--hint-color);
    margin-bottom: 12px;
    text-align: left;
}

/* Plan Card */
.plan-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.plan-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-name {
    font-size: 1.4rem;
    font-weight: 700;
}

.plan-name.plan-free {
    color: var(--hint-color);
}

.plan-name.plan-basic {
    color: #60a5fa;
}

.plan-name.plan-pro {
    background: linear-gradient(135deg, #f59e0b, #eab308);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.plan-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

/* Limits Card */
.limits-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.limits-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.limits-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* History */
.history-list {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.history-item {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-item:last-child {
    border-bottom: none;
}

.history-info {
    display: flex;
    flex-direction: column;
}

.history-type {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.history-date {
    font-size: 0.75rem;
    color: var(--hint-color);
}

.history-amount {
    font-size: 0.9rem;
    font-weight: 600;
}

.history-empty {
    padding: 30px;
    text-align: center;
    color: var(--hint-color);
}

/* Pricing Cards */
.pricing-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pricing-card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    position: relative;
}

.pricing-card.highlighted {
    border: 1px solid var(--primary-color);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1) 0%, var(--card-bg) 100%);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.pricing-tier-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.pricing-price-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}

.pricing-price {
    font-size: 1.8rem;
    font-weight: 800;
}

.pricing-period {
    opacity: 0.6;
    font-size: 0.9rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.pricing-features li {
    font-size: 0.85rem;
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    opacity: 0.8;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
}

.btn-outline-crypto {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.back-btn,
.back-btn-pricing {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 15px;
}

/* Key Input */
.key-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    color: white;
    margin-bottom: 10px;
}

.key-result {
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.key-result.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.key-result.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.pricing-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}


/* --- FAQ / Base Knowledge --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-item summary {
    padding: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '＋';
    font-size: 1.2rem;
    color: var(--hint-color);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 16px 16px 16px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-color);
    opacity: 0.9;
}

.profile-section {
    margin-bottom: 32px;
}

/* --- ADMIN DASHBOARD --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.admin-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--hint-color);
    margin-bottom: 4px;
}

.admin-stat-card .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.admin-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 0.95rem;
}

.admin-actions {
    margin-top: 10px;
}

.history-item.admin-user {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.admin-user-info {
    font-size: 0.9rem;
}

.admin-user-meta {
    font-size: 0.75rem;
    color: var(--hint-color);
}

/* --- Action Grid & Collapsible Transcript (Added) --- */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.action-grid> :last-child:nth-child(odd) {
    grid-column: span 2;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    /* Glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    width: 100%;
    /* Ensure full grid cell width */
    color: var(--text-color);
}

.action-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.1);
}

.action-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.action-btn span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Collapsible Transcript */
.transcript-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    /* Remove default triangle */
    padding: 10px 0;
}

.transcript-details summary::-webkit-details-marker {
    display: none;
}

.transcript-details summary h3 {
    margin: 0;
    text-align: left;
    /* Override centered h3 */
}

.transcript-details .chevron {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: var(--text-secondary);
}

.transcript-details[open] .chevron {
    transform: rotate(180deg);
}

.transcript-details .content-text {
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- LIGHT THEME FIXES --- */

/* Back Button - Make it visible */
.back-btn {
    background: var(--tg-theme-secondary-bg-color, rgba(0, 0, 0, 0.05));
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: opacity 0.2s;
}

.back-btn:hover {
    opacity: 0.8;
}

/* Stats in Profile/Referral */
.stat-value {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.8em;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Referral Stats Container */
.referral-stats {
    background: var(--tg-theme-secondary-bg-color, rgba(0, 0, 0, 0.05)) !important;
    border: 1px solid var(--glass-border);
}

/* Trash Icon in List */
.delete-btn-list {
    color: var(--hint-color);
}

.delete-btn-list:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

/* Usage Bar Text */
.usage-text {
    color: var(--text-color);
}

/* ============================================
   PRICING SCREEN — Premium Conversion Design
   ============================================ */

.pricing-screen {
    padding: 0 16px 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pricing-header {
    position: relative;
    text-align: center;
    padding: 30px 16px 20px;
}

.pricing-header h1 {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #e2e8f0, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-subtitle {
    color: var(--hint-color);
    font-size: 0.9em;
    margin: 0;
}

.back-btn-pricing {
    position: absolute;
    left: 16px;
    top: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.back-btn-pricing:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* --- Pricing Cards Container --- */
.pricing-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 420px;
    margin: 0 auto;
}

/* --- Base Card --- */
.pricing-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-2px);
}

/* --- Popular Card (Basic) --- */
.pricing-card.pc-popular {
    background: rgba(99, 102, 241, 0.06);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: visible;
}

.pricing-card.pc-popular::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa, #6366f1);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderShift 4s ease infinite;
    z-index: 0;
    pointer-events: none;
}

/* Контент карточки поверх анимированного бордера */
.pricing-card.pc-popular > * {
    position: relative;
    z-index: 1;
}

.pricing-card.pc-popular:hover {
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.25);
}

/* --- Premium Card (Pro) --- */
.pricing-card.pc-premium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.04));
    border-color: rgba(245, 158, 11, 0.2);
}

.pricing-card.pc-premium:hover {
    box-shadow: 0 8px 40px rgba(245, 158, 11, 0.2);
}

/* --- Badge --- */
.pricing-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

.pricing-badge.badge-popular {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    animation: badgePulse 2s ease infinite;
}

.pricing-badge.badge-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* --- Card Header --- */
.pc-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.pc-tier-name {
    font-size: 1.15em;
    font-weight: 600;
    color: var(--text-color);
}

.pc-popular .pc-tier-name {
    color: #a78bfa;
}

.pc-premium .pc-tier-name {
    color: #fbbf24;
}

/* --- Price --- */
.pc-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 18px;
}

.pc-price-value {
    font-size: 2.2em;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.pc-popular .pc-price-value {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pc-premium .pc-price-value {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pc-price-period {
    font-size: 0.85em;
    color: var(--hint-color);
}

/* --- Features List --- */
.pc-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pc-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88em;
    color: #cbd5e1;
}

.pc-features li .feat-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
}

.pricing-card .feat-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.pc-popular .feat-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.pc-premium .feat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* --- CTA Button --- */
.pc-cta {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.pc-cta-free {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pc-cta-free:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

.pc-cta-popular {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    animation: ctaGlow 2.5s ease infinite;
}

.pc-cta-popular:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

.pc-cta-premium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.pc-cta-premium:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px rgba(245, 158, 11, 0.45);
}

/* --- Alternative Payment Row --- */
.pc-alt-payments {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.pc-alt-btn {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 0.78em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
    white-space: nowrap;
}

.pc-alt-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

.pc-alt-btn.alt-ton {
    border-color: rgba(0, 152, 234, 0.3);
    color: #0098EA;
}

.pc-alt-btn.alt-ton:hover {
    background: rgba(0, 152, 234, 0.1);
}

/* --- Pricing Divider --- */
.pricing-divider {
    text-align: center;
    color: var(--hint-color);
    font-size: 0.8em;
    margin: 4px 0;
    opacity: 0.6;
}

/* --- Pricing Animations --- */
@keyframes borderShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(99, 102, 241, 0.6);
    }
}

@keyframes ctaGlow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 6px 35px rgba(99, 102, 241, 0.55);
    }
}

/* --- Upgrade Modal Enhanced --- */
.modal-content .upgrade-icon {
    font-size: 3em;
    margin-bottom: 12px;
    animation: floatIcon 3s ease-in-out infinite;
}

.modal-content .upgrade-remaining {
    display: inline-block;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 16px;
}

.modal-content .upgrade-features {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.modal-content .upgrade-features li {
    padding: 8px 0;
    color: #cbd5e1;
    font-size: 0.92em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-cta-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    transition: all 0.25s ease;
    font-family: inherit;
    animation: ctaGlow 2.5s ease infinite;
}

.modal-cta-primary.cta-basic {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.modal-cta-primary.cta-pro {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.modal-cta-secondary {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: transparent;
    color: var(--hint-color);
    font-size: 0.9em;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* --- Save Badge (скидка или экономия) --- */
.pc-save-badge {
    display: inline-block;
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    font-size: 0.72em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 8px;
}