/* =============================================
   knot — Telegram Mini App
   Palette: #dcbbf7 (purple), #c4c4c4 (gray)
   ============================================= */

:root {
    --purple: #dcbbf7;
    --purple-dim: rgba(220, 187, 247, 0.12);
    --purple-mid: rgba(220, 187, 247, 0.25);
    --purple-glow: rgba(220, 187, 247, 0.08);
    --gray: #c4c4c4;
    --gray-dim: rgba(196, 196, 196, 0.1);
    --bg: #0c0c0e;
    --bg-card: #141416;
    --bg-input: #1a1a1e;
    --bg-elevated: #1e1e22;
    --text-primary: #f0f0f2;
    --text-secondary: #8e8e93;
    --text-tertiary: #636366;
    --border: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(220, 187, 247, 0.4);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 100px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 600ms;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --btn-primary-text: #0c0c0e;
    --chip-missing-bg: rgba(255, 82, 82, 0.1);
    --chip-missing-border: rgba(255, 82, 82, 0.15);
    --chip-missing-color: #ff8a8a;
    --chip-present-bg: rgba(76, 217, 100, 0.08);
    --chip-present-border: rgba(76, 217, 100, 0.12);
    --chip-present-color: #7ee08a;
    --toast-bg: #2c1215;
    --toast-border: rgba(255, 82, 82, 0.2);
    --toast-color: #ff8a8a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

#app {
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* ---- Screens ---- */

.screen {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
    transition:
        opacity var(--duration-normal) var(--ease-out),
        transform var(--duration-normal) var(--ease-out);
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.screen.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.screen.exit-left {
    opacity: 0;
    transform: translateX(-30px);
}

.screen.exit-right {
    opacity: 0;
    transform: translateX(30px);
}

/* ---- Screen Header ---- */

.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(to bottom, var(--bg) 60%, transparent);
    padding-bottom: var(--space-xl);
}

.screen-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-back:active {
    transform: scale(0.92);
    background: var(--purple-dim);
}

/* ---- Language Toggle ---- */

.btn-lang {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}

.btn-lang:hover {
    background: var(--purple-dim);
    color: var(--purple);
    border-color: var(--border-focus);
}

.btn-lang:active {
    transform: scale(0.9);
}

/* ---- Welcome Screen ---- */

.welcome-top-bar {
    position: absolute;
    top: var(--space-md);
    right: var(--space-lg);
    z-index: 5;
    animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
}

.logo-mark {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s var(--ease-out) both;
    overflow: hidden;
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--purple) 0%, #f0e0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
    animation: fadeInUp 0.8s var(--ease-out) 0.08s both;
}

.tagline {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    letter-spacing: -0.01em;
    max-width: 260px;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s var(--ease-out) 0.16s both;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    width: 100%;
    max-width: 280px;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.feature-pill:nth-child(1) { animation: fadeInUp 0.7s var(--ease-out) 0.24s both; }
.feature-pill:nth-child(2) { animation: fadeInUp 0.7s var(--ease-out) 0.32s both; }
.feature-pill:nth-child(3) { animation: fadeInUp 0.7s var(--ease-out) 0.40s both; }

.feature-icon {
    color: var(--purple);
    font-size: 8px;
    opacity: 0.8;
}

/* ---- Buttons ---- */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: 52px;
    padding: 0 var(--space-xl);
    border-radius: var(--radius-full);
    background: var(--purple);
    color: var(--btn-primary-text);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-spring);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.7s var(--ease-out) 0.5s both;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.btn-analyze {
    width: 100%;
    animation: none;
}

.btn-analyze.loading .btn-text { opacity: 0; }
.btn-analyze.loading .btn-loader { opacity: 1; }

.btn-text { transition: opacity var(--duration-fast) var(--ease-out); }

.btn-loader {
    position: absolute;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.btn-loader .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--btn-primary-text);
    animation: dotPulse 1.2s var(--ease-in-out) infinite;
}
.btn-loader .dot:nth-child(2) { animation-delay: 0.15s; }
.btn-loader .dot:nth-child(3) { animation-delay: 0.3s; }

/* ---- Input Screen ---- */

.input-content {
    padding: 0 var(--space-lg) var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.input-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: 2px;
}

.input-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.input-hint {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
    white-space: nowrap;
}

.upload-btn:hover {
    background: var(--purple-dim);
    border-color: var(--border-focus);
    color: var(--purple);
}

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

.textarea-wrap {
    position: relative;
}

.textarea {
    width: 100%;
    min-height: 120px;
    max-height: 200px;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -0.01em;
    resize: none;
    outline: none;
    overflow-y: hidden;
    transition: border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}

.textarea:disabled {
    opacity: 0.5;
}

.textarea::placeholder {
    color: var(--text-tertiary);
}

.textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--purple-glow), 0 0 20px var(--purple-glow);
}

.file-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    background: var(--purple-dim);
    border: 1px solid rgba(220, 187, 247, 0.15);
    font-size: 12px;
    color: var(--purple);
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-out);
    max-width: 180px;
}

.file-badge.hidden {
    display: none;
}

.file-badge-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-badge-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(220, 187, 247, 0.15);
    border: none;
    color: var(--purple);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

.file-badge-remove:active {
    transform: scale(0.9);
}

.char-count {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---- Results Screen ---- */

.results-content {
    padding: 0 var(--space-lg) var(--space-2xl);
}

.score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--purple);
    opacity: 0.05;
    filter: blur(60px);
    pointer-events: none;
}

.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: var(--space-md);
}

.score-ring svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.score-ring-fill {
    fill: none;
    stroke: var(--purple);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.2s var(--ease-out);
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.score-label {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.results-section {
    margin-bottom: var(--space-lg);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-count {
    font-size: 13px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    animation: chipIn 0.5s var(--ease-out) both;
}

.keyword-chip.missing {
    background: var(--chip-missing-bg);
    border: 1px solid var(--chip-missing-border);
    color: var(--chip-missing-color);
}

.keyword-chip.present {
    background: var(--chip-present-bg);
    border: 1px solid var(--chip-present-border);
    color: var(--chip-present-color);
}

.keyword-chip.suggestion {
    background: var(--purple-dim);
    border: 1px solid rgba(220, 187, 247, 0.12);
    color: var(--purple);
}

.tip-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: var(--space-sm);
}

.tip-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.tip-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Category Cards ---- */

.categories-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.category-card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s var(--ease-out) both;
}

.cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.cat-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cat-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.cat-weight {
    font-size: 11px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: var(--gray-dim);
}

.cat-score {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.cat-bar-track {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.cat-bar-fill {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 0.8s var(--ease-out);
}

.cat-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    letter-spacing: -0.01em;
}

.cat-skills-group {
    margin-top: var(--space-sm);
}

.cat-skills-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
    letter-spacing: -0.01em;
}

/* ---- Fixed Resume Preview ---- */

.fixed-section {
    animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

.fixed-preview-card {
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: var(--space-md);
    max-height: 400px;
    overflow-y: auto;
}

.fixed-preview-text {
    padding: var(--space-md);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.download-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-download {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--purple);
    color: var(--btn-primary-text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.btn-download:active {
    transform: scale(0.96);
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    padding: 0 var(--space-lg);
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-copy:active {
    transform: scale(0.96);
    background: var(--purple-dim);
}

/* ---- Secondary Button ---- */

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    margin-top: var(--space-md);
}

.btn-secondary:active {
    transform: scale(0.97);
    background: var(--purple-dim);
}

/* ---- Animations ---- */

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

@keyframes chipIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scoreReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Error Toast ---- */

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 20px;
    border-radius: var(--radius-full);
    background: var(--toast-bg);
    border: 1px solid var(--toast-border);
    color: var(--toast-color);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-out);
    z-index: 100;
    white-space: nowrap;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- PRO Badge ---- */

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--purple) 0%, #c49bea 100%);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.pro-badge.hidden {
    display: none;
}

/* ---- Usage Bar ---- */

.usage-bar {
    display: flex;
    justify-content: center;
    padding: 0 var(--space-lg);
    margin-top: -12px;
    margin-bottom: var(--space-sm);
}

.usage-counter {
    font-size: 12px;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--gray-dim);
}

/* ---- Premium Tag ---- */

.premium-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--purple);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--purple-dim);
    border: 1px solid rgba(220, 187, 247, 0.15);
}

.premium-tag .lock-icon {
    width: 12px;
    height: 12px;
}

/* ---- Locked / Blurred ---- */

.fixed-preview-card.blurred {
    position: relative;
}

.fixed-preview-card.blurred .fixed-preview-text {
    filter: blur(5px);
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.blur-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: inherit;
}

.btn-download.locked,
.btn-copy.locked {
    opacity: 0.55;
}

.btn-download.locked .lock-icon,
.btn-copy.locked .lock-icon {
    width: 14px;
    height: 14px;
}

/* ---- Paywall Modal ---- */

.paywall-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.paywall-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.paywall-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: var(--space-xl) var(--space-lg) var(--space-2xl);
    text-align: center;
    transform: translateY(100%);
    transition: transform var(--duration-normal) var(--ease-spring);
    position: relative;
}

.paywall-overlay.visible .paywall-card {
    transform: translateY(0);
}

.paywall-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.paywall-close:active {
    transform: scale(0.9);
}

.paywall-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--purple-dim);
    border: 1px solid rgba(220, 187, 247, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    color: var(--purple);
}

.paywall-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.paywall-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: var(--space-xl);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.paywall-buy-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--purple);
    color: var(--btn-primary-text);
    font-family: var(--font);
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.paywall-buy-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.paywall-buy-btn:active {
    transform: scale(0.97);
}

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

.paywall-buy-btn .btn-text {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.paywall-price {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 1px;
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar { width: 0; }
