* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1B4332;
    --primary-dark: #143728;
    --primary-light: #74B860;
    --success: #74B860;
    --success-light: #e8f5e3;
    --error: #E63946;
    --error-light: #ffe8e8;
    --warning: #F4A261;
    --bg: #F5F9F5;
    --card: #FFFFFF;
    --text: #1B4332;
    --text-light: #4A6B5D;
    --border: #D4E4D9;
    --shadow: 0 4px 20px rgba(27, 67, 50, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Nunito', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Add padding to content screens, not full-bleed ones */
.exercise-container,
.feedback-container,
.insight-container,
.complete-content,
.welcome-content,
.lesson-container {
    padding: 20px;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    background: var(--bg);
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

/* Welcome Screen */
.welcome-content {
    text-align: center;
    padding: 60px 20px;
}

.logo {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.logo-img {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    border-radius: 20px;
    animation: float 3s ease-in-out infinite;
}

.welcome-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    border-radius: 28px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-content h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.tagline {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 24px;
    font-weight: 600;
}

.subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Module Selection */
.module-selection {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    text-align: left;
}

.module-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    text-align: center;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.module-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.15);
}

.module-card:active {
    transform: translateY(0);
}

.module-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.module-info {
    flex: 1;
}

.module-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

.module-desc {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.4;
}

.module-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.module-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.module-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.module-progress-text {
    font-size: 11px;
    color: var(--text-light);
    white-space: nowrap;
}

.module-loading, .module-error, .module-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.module-error {
    color: var(--danger);
}

.module-arrow {
    font-size: 20px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.module-card:hover .module-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

/* Lesson Screen - Distinctive Design */
.lesson-container {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #FEFDFB;
    overflow: hidden;
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    flex-shrink: 0;
}

.lesson-exit,
.exercise-exit {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.lesson-exit:hover,
.exercise-exit:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

.lesson-dots {
    display: flex;
    gap: 6px;
}

.lesson-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.lesson-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.lesson-dot.completed {
    background: var(--primary);
}

.lesson-skip {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    border: none;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.lesson-skip:hover {
    background: white;
    color: var(--text);
}

.lesson-carousel {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.lesson-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    touch-action: pan-y;
}

.lesson-card {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.lesson-hero {
    width: 100%;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #e8e4ff 0%, #d4e8ff 100%);
}

.lesson-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lesson-hero img.loaded {
    opacity: 1;
}

.lesson-hero-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    opacity: 0.8;
}

.lesson-hero img.loaded + .lesson-hero-fallback {
    display: none;
}

.lesson-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px;
    text-align: center;
}

.lesson-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    font-optical-sizing: auto;
    color: var(--text);
    margin-bottom: 12px;
    max-width: 340px;
    line-height: 1.2;
}

.lesson-text {
    font-size: 15px;
    line-height: 1.6;
    color: #5a6672;
    max-width: 320px;
    margin-bottom: 16px;
}

.lesson-example {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 14px 16px;
    max-width: 360px;
    width: 100%;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.lesson-example:empty {
    display: none;
}

.lesson-example-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.lesson-example-bad {
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 14px;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.lesson-example-bad::before {
    content: "✗";
    position: absolute;
    left: 0;
    font-weight: 700;
    font-size: 14px;
}

.lesson-example-good {
    color: #059669;
    font-size: 14px;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.lesson-example-good::before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: 700;
    font-size: 14px;
}

.lesson-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #FEFDFB;
    flex-shrink: 0;
}

.lesson-nav-back {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    background: white;
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    visibility: hidden;
}

.lesson-nav-back.visible {
    visibility: visible;
}

.lesson-nav-back:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.lesson-nav-next {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 24px;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 var(--primary-dark);
    font-family: inherit;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--primary-dark);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--primary-dark);
}

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

.btn-full {
    width: 100%;
}

.btn-secondary {
    background: var(--card);
    color: var(--primary);
    border: 3px solid var(--primary);
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--bg);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(1px);
}

.btn-next-exercise {
    display: block;
    width: 100%;
    margin: 20px auto 0;
    padding: 16px 32px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-next-exercise:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-next-exercise:active {
    transform: translateY(0);
}

.optional-label {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-light);
}

.btn-icon {
    font-size: 20px;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

/* Loading states */
.loading-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

.loading-text {
    color: var(--text-light);
    font-style: italic;
}

.rubric-item.loading {
    opacity: 0.7;
}

/* Exercise Top Bar */
.exercise-top-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1rem 0.5rem;
}

.exercise-top-bar .progress-bar {
    flex: 1;
    margin-bottom: 0;
}

.exercise-top-bar .progress-text {
    margin-bottom: 0;
    white-space: nowrap;
}

/* Progress Bar */
.progress-bar {
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 6px;
    transition: width 0.4s ease;
}

.progress-text {
    text-align: center;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 24px;
}

/* Exercise Container */
.exercise-container {
    background: var(--card);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
}

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

.exercise-subheader {
    margin-bottom: 16px;
}

.review-lesson-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    transition: all 0.2s ease;
}

.review-lesson-btn:hover {
    color: var(--primary);
}

.exercise-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.ai-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.ai-toggle input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 22px;
    background: var(--border);
    border-radius: 11px;
    position: relative;
    transition: background 0.2s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ai-toggle input:checked + .toggle-slider {
    background: var(--success);
}

.ai-toggle input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.toggle-label {
    user-select: none;
}

.ai-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-toggle.disabled .toggle-slider {
    cursor: not-allowed;
}

.ai-toggle.disabled .toggle-label {
    color: var(--text-light);
}

/* Scenario Box */
.scenario-box {
    background: linear-gradient(135deg, #e8f5e3, #d4e8d0);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary);
}

.scenario-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.scenario-text {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
}

/* Prompt Input */
.prompt-section {
    margin-bottom: 24px;
    overflow: visible;
}

.prompt-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.prompt-input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-family: inherit;
    border: 3px solid var(--border);
    border-radius: 16px;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease;
    line-height: 1.5;
}

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

.prompt-input::placeholder {
    color: #aaa;
}

.char-count {
    text-align: right;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}

.char-count.near-limit {
    color: var(--warning);
}

.char-count.at-limit {
    color: var(--error);
}

.char-limit-hover {
    cursor: help;
    border-bottom: 1px dashed var(--text-light);
}

.char-limit-hover:hover {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.info-tooltip {
    display: none;
    position: absolute;
    top: 28px;
    right: 0;
    background: #2D3436;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    width: 260px;
    text-align: left;
    line-height: 1.5;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.info-tooltip.visible {
    display: block;
}

/* Rewrite Challenge */
.rewrite-task-box {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.rewrite-task-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.rewrite-task-text {
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
    margin: 0;
}

.weak-prompt-box {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 4px solid #e57373;
}

.weak-prompt-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #c62828;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.weak-prompt-text {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    font-style: italic;
    margin: 0;
}

.hints-box {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
    overflow: hidden;
}

.hints-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
}

.hints-header:hover {
    background: rgba(255, 193, 7, 0.15);
}

.hints-label {
    font-size: 14px;
    font-weight: 700;
    color: #f57c00;
}

.hints-toggle {
    font-size: 12px;
    color: #f57c00;
    transition: transform 0.2s ease;
}

.hints-box.expanded .hints-toggle {
    transform: rotate(180deg);
}

.hints-list {
    margin: 0;
    padding: 0 16px 16px 36px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    display: none;
}

.hints-box.expanded .hints-list {
    display: block;
}

.hints-list li {
    margin-bottom: 4px;
}

.rewrite-checklist {
    margin-bottom: 24px;
}

.checklist-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}

.checklist-icon {
    font-size: 16px;
}

.ai-rewrite-feedback {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid #2196F3;
}

.ai-feedback-header {
    font-size: 13px;
    font-weight: 700;
    color: #1565C0;
    margin-bottom: 8px;
}

.ai-rewrite-feedback p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 8px 0;
}

.ai-rewrite-feedback .ai-suggestion {
    color: #1565C0;
    font-weight: 600;
    margin-bottom: 0;
}

/* Feedback Screen */
.feedback-container {
    padding: 10px 0;
}

.feedback-header {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary);
}

.your-prompt-box {
    background: var(--bg);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 28px;
}

.prompt-box-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
}

.prompt-box-text {
    font-size: 15px;
    color: var(--text);
    font-style: italic;
}

/* Rubric Section */
.rubric-section {
    margin-bottom: 28px;
}

.rubric-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.rubric-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rubric-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card);
    border-radius: 12px;
    border: 2px solid var(--border);
    font-size: 15px;
}

.rubric-check {
    font-size: 18px;
    flex-shrink: 0;
}

/* Examples Section */
.examples-section {
    margin-bottom: 28px;
}

.examples-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.example-box {
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.example-box.lazy {
    background: #fff5f5;
    border: 2px solid #e57373;
}

.example-box.ai-feedback {
    background: #f0f7ff;
    border: 2px solid #a8c9e0;
    position: relative;
}

.ai-disclaimer {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: #a8c9e0;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ai-disclaimer:hover + .ai-disclaimer-tooltip {
    display: block;
}

.ai-disclaimer-tooltip:hover {
    display: block;
}

.ai-disclaimer-tooltip {
    pointer-events: auto;
}

.ai-disclaimer-tooltip {
    display: none;
    position: absolute;
    top: 32px;
    right: -8px;
    background: var(--text);
    color: white;
    padding: 12px 16px;
    padding-top: 18px;
    border-radius: 10px;
    font-size: 13px;
    width: 260px;
    line-height: 1.5;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ai-disclaimer-tooltip::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 8px;
    left: 0;
    height: 20px;
}

.ai-disclaimer-tooltip a {
    color: #a8d4ff;
    text-decoration: underline;
    cursor: pointer;
}

/* Settings Modal */
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.settings-modal.active {
    display: flex;
}

.settings-content {
    background: white;
    border-radius: 20px;
    padding: 28px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow);
}

.settings-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.settings-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-option:hover {
    border-color: var(--primary-light);
}

.settings-option.selected {
    border-color: var(--primary);
    background: #e8f5e3;
}

.settings-option input {
    display: none;
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-option.selected .option-radio {
    border-color: var(--primary);
}

.settings-option.selected .option-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.option-text {
    flex: 1;
}

.option-label {
    font-weight: 700;
    font-size: 15px;
}

.option-desc {
    font-size: 13px;
    color: var(--text-light);
}

.settings-close {
    width: 100%;
    margin-top: 16px;
}

.example-box.sharp {
    background: var(--success-light);
    border: 2px solid var(--success);
}

.example-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.example-text {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 8px;
    font-style: italic;
}

.example-why {
    font-size: 13px;
    color: var(--text-light);
}

/* Self Rate Section */
.self-rate-section {
    text-align: center;
    padding-top: 8px;
}

.rate-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.rate-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.rate-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-width: 90px;
}

.rate-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.rate-emoji {
    font-size: 28px;
}

.rate-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
}

.try-again-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
    text-align: center;
}

/* Insight Screen */
.insight-container {
    text-align: center;
    padding: 40px 20px;
}

.insight-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pop 0.4s ease;
}

@keyframes pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.insight-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
}

.insight-text {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 28px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.key-principle {
    background: linear-gradient(135deg, #e8f5e3, #d4e8d0);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 32px;
    text-align: left;
}

.principle-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.principle-text {
    font-size: 16px;
    color: var(--text);
    font-weight: 600;
}

/* Complete Screen */
.complete-content {
    text-align: center;
    padding: 50px 20px;
}

.complete-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.complete-content h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 28px;
}

.stats-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--card);
    border-radius: 16px;
    padding: 20px 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}

.complete-message {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 480px) {
    .welcome-content h1 {
        font-size: 36px;
    }
    
    .exercise-container {
        padding: 20px;
    }
    
    .scenario-text {
        font-size: 15px;
    }
    
    .rate-buttons {
        flex-wrap: wrap;
    }
    
    .rate-btn {
        flex: 1;
        min-width: 80px;
    }
    
    .stats-grid {
        flex-direction: column;
    }
    
    /* User menu mobile */
    .user-menu {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }
    
    .user-info {
        order: 1;
    }
    
    .user-actions {
        order: 2;
    }
}

/* ============================================
   AUTH STYLES
   ============================================ */

.auth-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-img {
    width: 72px;
    height: 72px;
    margin-bottom: 0.75rem;
    border-radius: 18px;
}

.auth-header h1 {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.auth-header .tagline {
    color: var(--text-muted);
    font-size: 1rem;
}

.auth-form {
    width: 100%;
    max-width: 360px;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.auth-title {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.auth-submit {
    width: 100%;
    margin-top: 1rem;
    padding: 0.875rem;
    font-size: 1rem;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.auth-footer a {
    color: var(--text-light);
    font-size: 0.8rem;
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Password input with reveal toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    touch-action: manipulation;
}

.password-toggle:hover {
    color: var(--text);
}

.password-toggle:active {
    color: var(--primary);
}

.password-toggle .eye-icon {
    pointer-events: none;
}

.auth-error {
    background: #FEE2E2;
    color: #DC2626;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    margin-top: 1rem;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-success {
    background: #D1FAE5;
    color: #059669;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    margin-top: 1rem;
    display: none;
}

.auth-success.show {
    display: block;
}

/* Verify Banner */
.verify-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #FEF3C7;
    color: #92400E;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
    z-index: 100;
}

.verify-resend {
    background: #F59E0B;
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.verify-resend:hover {
    background: #D97706;
}

/* User menu */
.user-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

.plan-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    letter-spacing: 0.5px;
}

.plan-free {
    background: var(--border);
    color: var(--text-light);
}

.plan-pro {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}

.plan-team {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: white;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upgrade-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.upgrade-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.settings-link {
    font-size: 1.1rem;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.settings-link:hover {
    opacity: 1;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.logout-btn:hover {
    color: var(--text);
}

/* ============================================
   OAUTH BUTTONS
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: lowercase;
}

.oauth-buttons {
    display: flex;
    gap: 0.75rem;
}

.oauth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    background: white;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
    touch-action: manipulation;
}

.oauth-btn:hover {
    border-color: var(--text-light);
    background: #fafafa;
}

.oauth-btn:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.oauth-btn:active {
    transform: scale(0.98);
}

.oauth-btn svg {
    flex-shrink: 0;
}

/* ============================================
   PROFILE SETUP (ONBOARDING)
   ============================================ */

.profile-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header .logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.profile-header h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-wrap: balance;
}

.profile-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    max-width: 320px;
    margin: 0 auto;
}

.profile-form {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.profile-form .form-group {
    margin-bottom: 1.25rem;
}

/* Profile sections */
.profile-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.profile-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.section-title {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

/* Side-by-side form fields */
.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

.profile-form .form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.profile-form select,
.profile-form input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
    color: var(--text);
}

.profile-form select:focus,
.profile-form input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   SETTINGS PAGE
   ============================================ */

.settings-page {
    min-height: 100vh;
    background: var(--bg);
    padding-bottom: 2rem;
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.settings-back {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.settings-back:hover {
    text-decoration: underline;
}

.settings-header h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    color: var(--text);
    margin: 0;
}

.settings-nav {
    display: flex;
    gap: 0;
    padding: 0 1.5rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.settings-tab {
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.settings-tab:hover {
    color: var(--text);
}

.settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.settings-panel {
    display: none;
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.settings-panel.active {
    display: block;
}

/* Subscription Summary (Profile tab) */
.subscription-summary {
    padding: 0 !important;
    margin-bottom: 1.5rem !important;
}

.subscription-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.subscription-summary-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subscription-summary-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.subscription-summary-desc {
    color: var(--text-light);
    font-size: 0.85rem;
}

.subscription-summary-desc::before {
    content: "•";
    margin: 0 0.5rem;
    color: var(--border);
}

.subscription-summary-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.subscription-summary-link:hover {
    text-decoration: underline;
}

.subscription-summary .subscription-plan-badge.pro {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.subscription-summary .subscription-plan-badge.team {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Legacy Subscription Card (upgrade prompts) */
.subscription-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid var(--primary-light);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.subscription-card.is-pro {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    border-color: #fbbf24;
}

.subscription-card.is-team {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #a78bfa;
}

.subscription-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subscription-plan-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: 1rem;
    letter-spacing: 0.5px;
    background: var(--primary);
    color: white;
}

.subscription-card.is-pro .subscription-plan-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.subscription-card.is-team .subscription-plan-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.subscription-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.subscription-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.btn-upgrade {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-upgrade:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.subscription-card.is-pro .btn-upgrade,
.subscription-card.is-team .btn-upgrade {
    display: none;
}

/* Subscription Status Card (Settings > Subscription tab) */
.subscription-status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.subscription-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.subscription-status-plan {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subscription-plan-badge.large {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.subscription-plan-badge.large.pro {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.subscription-plan-badge.large.team {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.subscription-plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.subscription-status-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    background: #dcfce7;
    color: #166534;
}

.subscription-status-indicator.canceling {
    background: #fef3c7;
    color: #92400e;
}

.subscription-status-indicator.expired {
    background: #fee2e2;
    color: #991b1b;
}

.subscription-status-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.subscription-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.subscription-detail-label {
    color: var(--text-light);
}

.subscription-detail-value {
    color: var(--text);
    font-weight: 500;
}

.subscription-status-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-cancel-sub {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-sub:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-reactivate {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-reactivate:hover {
    background: var(--primary-dark);
}

/* Invoice List */
.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.invoice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.invoice-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.invoice-date {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

.invoice-amount {
    font-size: 0.8rem;
    color: var(--text-light);
}

.invoice-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

.invoice-status.paid {
    background: #dcfce7;
    color: #166534;
}

.invoice-status.open {
    background: #fef3c7;
    color: #92400e;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
}

.invoice-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
}

.invoice-link:hover {
    text-decoration: underline;
}

.no-invoices {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Subscription card mobile */
@media (max-width: 480px) {
    .subscription-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        text-align: center;
    }
    
    .subscription-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.settings-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.settings-section-title {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    color: var(--text);
    margin: 0 0 0.25rem 0;
}

.settings-section-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 0 1.25rem 0;
}

.settings-section .form-group {
    margin-bottom: 1rem;
}

.settings-section .form-group:last-child {
    margin-bottom: 0;
}

.settings-section label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.settings-section input[type="text"],
.settings-section input[type="email"],
.settings-section select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.settings-section input:focus,
.settings-section select:focus {
    outline: none;
    border-color: var(--primary);
}

.settings-section input:disabled {
    background: var(--bg);
    color: var(--text-light);
    cursor: not-allowed;
}

.settings-directness {
    margin-top: 1rem;
}

/* Checkbox styles */
.settings-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    margin: 0 -0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-checkbox:hover {
    background: var(--bg);
}

.settings-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 0.375rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 2px;
}

.settings-checkbox input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.settings-checkbox input:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.settings-checkbox input:focus-visible + .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.15);
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.checkbox-label strong {
    font-size: 0.9rem;
    color: var(--text);
}

.checkbox-label span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Actions */
.settings-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.settings-save-status {
    font-size: 0.85rem;
    color: var(--success);
}

.settings-save-status.error {
    color: var(--error);
}

.optional-tag {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-light);
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    margin-left: 0.25rem;
}

/* Directness Options */
.directness-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.directness-option {
    cursor: pointer;
}

.directness-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    background: white;
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
    text-align: center;
}

.directness-option input:checked + .option-card {
    border-color: var(--primary);
    background: #e8f5e3;
}

.directness-option input:focus-visible + .option-card {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.option-card:hover {
    border-color: var(--primary-light);
}

.option-emoji {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.option-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.option-desc {
    font-size: 0.7rem;
    color: var(--text-light);
    line-height: 1.3;
}

.skip-profile-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}

.skip-profile-btn:hover {
    color: var(--text);
}

.skip-profile-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Option text wrapper for directness cards */
.directness-option .option-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .oauth-buttons {
        flex-direction: column;
    }
    
    .directness-options,
    .settings-directness {
        grid-template-columns: 1fr;
    }
    
    .directness-option .option-card,
    .settings-directness .option-card {
        flex-direction: row;
        padding: 1rem 1.25rem;
        gap: 1rem;
        text-align: left;
    }
    
    .directness-option .option-emoji,
    .settings-directness .option-emoji {
        margin-bottom: 0;
        font-size: 1.75rem;
        flex-shrink: 0;
    }
    
    .directness-option .option-text {
        align-items: flex-start;
    }
    
    .directness-option .option-label,
    .settings-directness .option-label {
        font-size: 1rem;
    }
    
    .directness-option .option-desc,
    .settings-directness .option-desc {
        font-size: 0.85rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* Settings mobile adjustments */
    .settings-panel {
        padding: 1rem;
    }
    
    .settings-section {
        padding: 1.25rem;
    }
    
    .settings-nav {
        padding: 0 1rem;
    }
    
    .settings-tab {
        padding: 0.875rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .settings-header {
        padding: 1rem;
    }
    
    /* Danger zone mobile */
    .danger-action {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .danger-action .btn-danger {
        width: 100%;
    }
    
    .pending-deletion-notice {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .pending-deletion-notice .btn-secondary {
        width: 100%;
    }
}

/* ============================================
   WELCOME FLOW (ONBOARDING PHASE 5)
   ============================================ */

.welcome-flow-container {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #e8f5e3 0%, #d4e8d0 50%, #c5ddc0 100%);
    overflow: hidden;
    box-sizing: border-box;
}

.welcome-flow-carousel {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.welcome-flow-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.welcome-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.welcome-slide-content {
    max-width: 400px;
    text-align: center;
}

.welcome-illustration {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.welcome-slide h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 1rem;
    text-wrap: balance;
}

.welcome-text {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.welcome-subtext {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* How it works steps */
.welcome-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}

.welcome-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.95rem;
    color: var(--text);
}

/* Module previews */
.welcome-modules {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.welcome-module-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: left;
}

.module-preview-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.module-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.module-preview-info strong {
    font-size: 0.95rem;
    color: var(--text);
}

.module-preview-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* CTA buttons */
.welcome-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.welcome-start-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.welcome-alt-btn {
    padding: 0.75rem 1.5rem;
}

.skip-welcome-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.skip-welcome-btn:hover {
    color: var(--text);
}

.skip-welcome-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* Navigation */
.welcome-flow-nav {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: 1.5rem 1.5rem 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

.welcome-dots {
    display: flex;
    gap: 0.5rem;
}

.welcome-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, transform 0.2s;
}

.welcome-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.welcome-dot.completed {
    background: var(--primary-light);
}

.welcome-nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
}

.welcome-nav-back {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.welcome-nav-back:hover {
    border-color: var(--primary);
    background: #e8f5e3;
}

.welcome-nav-back:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.welcome-nav-next {
    flex: 1;
    padding: 0.875rem 1.5rem;
}

/* Responsive */
@media (max-width: 400px) {
    .welcome-slide {
        padding: 1.5rem;
    }
    
    .welcome-illustration {
        font-size: 3rem;
    }
    
    .welcome-slide h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   ACCOUNT SETTINGS (Phase 4 & 5)
   ============================================ */

/* OAuth Info */
.oauth-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.5rem;
}

.oauth-provider-icon {
    font-size: 1.5rem;
}

.oauth-provider-text {
    color: var(--text-light);
}

/* Danger Zone */
.settings-danger-zone {
    border: 2px solid #fee2e2;
    background: #fef2f2;
}

.settings-danger-zone .settings-section-title {
    color: #dc2626;
}

.danger-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
}

.danger-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.danger-info strong {
    color: var(--text);
}

.danger-info span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-danger {
    padding: 0.5rem 1rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-danger:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Pending Deletion Notice */
.pending-deletion-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 0.5rem;
    border: 1px solid #fcd34d;
}

.notice-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notice-icon {
    font-size: 1.25rem;
}

.notice-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.notice-text strong {
    color: #92400e;
}

.notice-text span {
    font-size: 0.85rem;
    color: #a16207;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.modal-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.modal-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.modal-warning strong {
    display: block;
    color: #dc2626;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.modal-warning ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
    color: #991b1b;
}

.modal-warning li {
    margin-bottom: 0.25rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Limit Reached Modal */
.limit-modal {
    text-align: center;
    max-width: 360px;
}

.limit-modal-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.limit-modal h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
    color: var(--text);
}

.limit-modal-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
}

.limit-modal-reset {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0 0 1.5rem 0;
    opacity: 0.7;
}

.limit-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.limit-modal-actions .btn-primary {
    width: 100%;
}

.limit-modal-actions .btn-secondary {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
}

.limit-modal-actions .btn-secondary:hover {
    color: var(--text);
}

.text-warning {
    color: #d97706 !important;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: #f0fdf4;
}

/* ============================================
   UPGRADE / PRICING PAGE
   ============================================ */

.upgrade-page {
    min-height: 100vh;
    background: var(--bg);
}

.upgrade-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.upgrade-back {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.upgrade-header h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    color: var(--text);
    margin: 0;
}

.upgrade-content {
    padding: 2rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.upgrade-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.upgrade-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.upgrade-hero h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.upgrade-hero p {
    color: var(--text-light);
    margin: 0;
}

/* Pricing Cards */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
}

.pricing-card:hover {
    border-color: var(--primary-light);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(27, 67, 50, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.1rem;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.pricing-amount .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.pricing-amount .period {
    font-size: 0.9rem;
    color: var(--text-light);
}

.pricing-equivalent {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text);
}

.pricing-btn {
    width: 100%;
}

.pricing-footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.pricing-footer p {
    margin: 0.5rem 0;
}

.pricing-footer a {
    color: var(--primary);
}

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e3 0%, #d4e8d0 100%);
    padding: 2rem;
}

.success-content {
    text-align: center;
    background: white;
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    max-width: 400px;
}

.success-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.success-content h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.success-content p {
    color: var(--text-light);
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        order: -1;
    }
    
    .upgrade-content {
        padding: 1.5rem 1rem;
    }
}

/* Trial styles */
.subscription-status-indicator.trial {
    background: #e8f5e3;
    color: #1B4332;
}

.trial-expired-notice {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.trial-expired-notice span {
    color: #92400e;
    font-size: 0.85rem;
}

.btn-trial {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #74B860 0%, #1B4332 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-trial:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.3);
}

.btn-upgrade-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-light);
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-upgrade-secondary:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Trial progress */
.trial-progress {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

.subscription-status-actions {
    flex-direction: column;
    align-items: stretch;
}

.trial-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.trial-progress-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.trial-progress-count {
    font-size: 0.85rem;
    color: #15803d;
    font-weight: 500;
}

.trial-progress-bar {
    height: 8px;
    background: #dcfce7;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.trial-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #74B860, #1B4332);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.trial-progress-hint {
    font-size: 0.8rem;
    color: #64748b;
}

/* ============================================
   PHASE 5D: CONVERSION OPTIMIZATION
   ============================================ */

/* Trial Status Banner (home screen) */
.trial-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #74B860 0%, #1B4332 100%);
    color: white;
}

.trial-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trial-banner-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.trial-banner-text {
    font-size: 0.85rem;
    opacity: 0.95;
}

.trial-banner-cta {
    background: white;
    color: #1B4332;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.trial-banner-cta:hover {
    transform: scale(1.02);
}

/* Trial Expiring Banner (urgent) */
.trial-expiring-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    position: relative;
}

.trial-expiring-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trial-expiring-icon {
    font-size: 1.1rem;
}

.trial-expiring-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.trial-expiring-cta {
    background: white;
    color: #d97706;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.trial-expiring-cta:hover {
    transform: scale(1.02);
}

.trial-expiring-dismiss {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
}

.trial-expiring-dismiss:hover {
    color: white;
}

/* Post-Trial Conversion Modal */
.conversion-modal {
    text-align: center;
    max-width: 380px;
}

.conversion-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.conversion-modal h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.conversion-desc {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.conversion-stats {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.conversion-stat {
    text-align: center;
}

.conversion-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.conversion-stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversion-cta-text {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.conversion-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conversion-actions .btn-primary {
    padding: 0.75rem 1.5rem;
}

.conversion-actions .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Low Limit Warning Toast */
.low-limit-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(1rem);
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0);
    }
}

.low-limit-icon {
    font-size: 1.1rem;
}

.low-limit-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #92400e;
}

.low-limit-cta {
    background: #d97706;
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.low-limit-cta:hover {
    background: #b45309;
}

.low-limit-dismiss {
    background: transparent;
    border: none;
    color: #92400e;
    opacity: 0.6;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
}

.low-limit-dismiss:hover {
    opacity: 1;
}

/* Post-Review Upgrade Nudge */
.post-review-nudge {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.post-review-nudge-text {
    font-size: 0.85rem;
    color: #15803d;
}

.post-review-nudge-cta {
    background: #74B860;
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.post-review-nudge-cta:hover {
    background: #1B4332;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .trial-banner {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .trial-expiring-banner {
        flex-wrap: wrap;
        padding-right: 2rem;
    }
    
    .low-limit-toast {
        left: 1rem;
        right: 1rem;
        transform: none;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    @keyframes slideUp {
        from { 
            opacity: 0; 
            transform: translateY(1rem);
        }
        to { 
            opacity: 1; 
            transform: translateY(0);
        }
    }
}
