/* ========================================
   VARIABLES & RESET
   ======================================== */
:root {
    /* Color Palette - Buddhist-inspired warm tones */
    --color-primary: #F2C94C;        /* Muted yellow */
    --color-secondary: #F2994A;      /* Warm orange */
    --color-accent: #FAD390;         /* Light apricot */
    --color-background: #FAFAF8;     /* Off-white/cream */
    --color-text: #333333;           /* Dark gray */
    --color-text-light: #666666;     /* Medium gray */
    --color-border: #E8E8E8;         /* Light border */
    --color-error: #E74C3C;          /* Subtle error */
    --color-shadow: rgba(0, 0, 0, 0.1);

    /* Hero headline additions */
    --cosmic-purple-1: #7C3AED;      /* Cosmic purple start */
    --cosmic-purple-2: #C084FC;      /* Cosmic purple end */
    --serene-green: #6BCB77;         /* Peaceful fresh green (closer to image) */
    --neutral-gray: #9CA3AF;         /* Soft gray for negative */
    --serene-tint: rgba(107, 203, 119, 0.08); /* Page background tint */
    --serene-tint-strong: rgba(107, 203, 119, 0.12);

    /* Typography */
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    /* Use the "Positive Ones" background tint site-wide */
    background:
        radial-gradient(1200px 600px at 50% -10%, var(--serene-tint-strong), rgba(107,203,119,0) 60%),
        linear-gradient(0deg, var(--serene-tint), var(--serene-tint));
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   BACKGROUND & LAYOUT
   ======================================== */
.background-sun {
    position: fixed;
    top: -10%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--serene-tint-strong) 0%, rgba(107, 203, 119, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    width: 100%;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
}

.headline {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Stacked, color-expressive hero headline */
.headline-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.hero-line {
    display: inline-block;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* Cosmic purple with gentle shimmer */
.hero-line.cosmic {
    background: linear-gradient(90deg, var(--cosmic-purple-1), var(--cosmic-purple-2), var(--cosmic-purple-1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: shimmer 6s linear infinite;
    text-shadow: 0 2px 12px rgba(124, 58, 237, 0.15);
}

/* Neutral gray, slightly cushioned */
.hero-line.neutral {
    color: var(--neutral-gray);
    background: rgba(156, 163, 175, 0.06);
    border: 1px solid rgba(156, 163, 175, 0.18);
    padding: 0.15rem 0.75rem;
    border-radius: 14px;
}

/* Serene green with soft glow */
.hero-line.serene {
    color: var(--serene-green);
    background: rgba(107, 203, 119, 0.08);
    border: 1px solid rgba(107, 203, 119, 0.18);
    padding: 0.15rem 0.75rem;
    border-radius: 14px;
    text-shadow: 0 2px 10px rgba(107, 203, 119, 0.18);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    font-weight: var(--font-weight-light);
    line-height: 1.5;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    min-height: 300px;
    margin-bottom: var(--spacing-xl);
}

/* ========================================
   INPUT SECTION
   ======================================== */
.input-section {
    animation: fadeIn 0.6s ease-in-out;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.thought-input {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1rem;
    font-family: var(--font-main);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    resize: vertical;
    min-height: 120px;
    transition: var(--transition);
    background-color: white;
    color: var(--color-text);
}

.thought-input::placeholder {
    color: var(--color-text-light);
    opacity: 0.7;
}

.thought-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(242, 153, 74, 0.1);
}

/* ========================================
   BUTTONS
   ======================================== */
.button-container {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-transform {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(242, 153, 74, 0.3);
    min-width: 200px;
    position: relative;
}

.btn-transform:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 153, 74, 0.4);
}

.btn-transform:active:not(:disabled) {
    transform: translateY(0);
}

.btn-transform:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-reset {
    background-color: var(--color-primary);
    color: var(--color-text);
    box-shadow: 0 2px 8px rgba(242, 201, 76, 0.2);
}

.btn-reset:hover {
    background-color: var(--color-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 153, 74, 0.3);
}

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

.btn-deeper {
    background-color: var(--serene-green);
    color: white;
    box-shadow: 0 2px 10px rgba(107, 203, 119, 0.35);
    transition: var(--transition);
}

.btn-deeper:hover {
    background-color: #58ba69;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(88, 186, 105, 0.45);
}

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

.btn-deeper.active {
    background-color: var(--serene-green);
    color: white;
}

/* ========================================
   SPINNER
   ======================================== */
.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.hidden {
    display: none;
}

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

.btn-text.hidden {
    display: none;
}

/* ========================================
   RESULT SECTION
   ======================================== */
.result-section {
    animation: slideUp 0.5s ease-out;
}

.result-section.hidden {
    display: none;
}

.result-box {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--color-secondary);
    box-shadow: 0 4px 20px var(--color-shadow);
    animation: fadeIn 0.5s ease-out;
}

.result-title {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    background: linear-gradient(90deg, var(--cosmic-purple-1), var(--cosmic-purple-2), var(--cosmic-purple-1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: shimmer 8s linear infinite;
    text-shadow: 0 2px 10px rgba(124, 58, 237, 0.15);
}

.result-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
    font-weight: var(--font-weight-light);
}

/* Slightly larger quick summary text under the title */
.result-quick .result-text {
    font-size: 1.2rem;
    line-height: 1.9;
}

/* Markdown styling for result text */
.result-text strong {
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
}

.result-text em {
    font-style: italic;
    color: var(--color-secondary);
    opacity: 0.85;
}

.result-text .highlight {
    font-weight: var(--font-weight-bold);
    color: var(--serene-green);
    background-color: rgba(107, 203, 119, 0.10);
    padding: 0 4px;
    border-radius: 3px;
    transition: var(--transition);
}

.result-text .highlight:hover {
    background-color: rgba(107, 203, 119, 0.20);
    box-shadow: 0 0 0 2px rgba(107, 203, 119, 0.30);
}

.result-text br {
    display: block;
    content: "";
    margin: var(--spacing-sm) 0;
}

/* Result sections - Quick and Deeper */
.result-quick {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--serene-green);
}

/* Keep the Deeper button above the divider, centered */
.button-row-above-line {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-sm);
}

.result-deeper {
    animation: slideDown 0.5s ease-out;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--serene-green);
}

.result-deeper.hidden {
    display: none;
}

.result-deeper-text {
    color: var(--color-text);
    opacity: 0.9;
    font-weight: var(--font-weight-regular);
}

/* Button arrangement in result box: center Deeper, smaller Reset bottom-right */
.result-box .button-container {
    flex-direction: column;
    align-items: flex-end;
}

.result-box .btn-deeper {
    align-self: center;
}

.result-box .btn-reset {
    align-self: flex-end;
    font-size: 0.85rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    box-shadow: none;
    opacity: 0.9;
}

.result-box .btn-reset:hover {
    background-color: var(--serene-tint);
    color: var(--color-text);
    border-color: rgba(107,203,119,0.4);
}

/* ========================================
   ERROR SECTION
   ======================================== */
.error-section {
    animation: slideUp 0.5s ease-out;
}

.error-section.hidden {
    display: none;
}

.error-box {
    background: #FEE;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border-left: 5px solid var(--color-error);
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
}

.error-text {
    font-size: 1rem;
    color: var(--color-error);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
    color: var(--color-text-light);
    font-weight: var(--font-weight-light);
    border-top: 1px solid rgba(107, 203, 119, 0.35);
    margin-top: auto;
}

.footer-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-remember {
    background: linear-gradient(90deg, var(--cosmic-purple-1), var(--cosmic-purple-2), var(--cosmic-purple-1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: shimmer 12s linear infinite;
    font-weight: var(--font-weight-bold);
}

.footer-key {
    color: var(--serene-green);
    background: rgba(107, 203, 119, 0.10);
    border: 1px solid rgba(107, 203, 119, 0.25);
    padding: 0 6px;
    border-radius: 10px;
    font-weight: var(--font-weight-semibold);
}

.footer-emoji {
    opacity: 0.9;
}

.footer-feedback-btn {
    margin-top: var(--spacing-md);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.9rem;
    font-weight: var(--font-weight-regular);
    font-family: var(--font-main);
    background: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-feedback-btn:hover {
    background: var(--serene-tint);
    color: var(--serene-green);
    border-color: rgba(107, 203, 119, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(107, 203, 119, 0.2);
}

.footer-feedback-btn:active {
    transform: translateY(0);
}

/* ========================================
   INFO BUTTON
   ======================================== */
.info-btn {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: white;
    color: var(--cosmic-purple-1);
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.2);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 0;
}

.info-btn:hover {
    background: linear-gradient(135deg, var(--cosmic-purple-1), var(--cosmic-purple-2));
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

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

.info-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--spacing-md);
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.modal-close:hover {
    background: var(--serene-tint);
    color: var(--color-text);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    background: linear-gradient(90deg, var(--cosmic-purple-1), var(--cosmic-purple-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-md);
    text-align: center;
}

.modal-body {
    padding: 0 var(--spacing-xl) var(--spacing-xl);
}

.modal-section {
    margin-bottom: var(--spacing-lg);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 1.15rem;
    font-weight: var(--font-weight-bold);
    color: var(--serene-green);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.modal-section p {
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.modal-section p:last-child {
    margin-bottom: 0;
}

.modal-list {
    list-style: none;
    padding: 0;
    margin: var(--spacing-sm) 0 0;
}

.modal-list li {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    background: var(--serene-tint);
    border-left: 3px solid var(--serene-green);
    border-radius: var(--radius-sm);
    line-height: 1.6;
    color: var(--color-text);
}

.modal-list li:last-child {
    margin-bottom: 0;
}

.modal-list li strong {
    color: var(--serene-green);
    font-weight: var(--font-weight-semibold);
}

.modal-disclaimer {
    background: rgba(242, 153, 74, 0.08);
    border: 1px solid rgba(242, 153, 74, 0.25);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.modal-disclaimer-title {
    color: var(--color-secondary);
    font-size: 1.05rem;
}

.modal-disclaimer-text {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

.modal-privacy {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.modal-privacy-title {
    color: var(--cosmic-purple-1);
    font-size: 1.05rem;
}

.modal-privacy-text {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-sm);
}

.modal-privacy-text:last-child {
    margin-bottom: 0;
    margin-top: var(--spacing-sm);
}

.modal-privacy-text strong {
    color: var(--cosmic-purple-1);
    font-weight: var(--font-weight-semibold);
}

.modal-privacy-list {
    list-style: disc;
    padding-left: var(--spacing-lg);
    margin: var(--spacing-sm) 0;
}

.modal-privacy-list li {
    padding: var(--spacing-xs) 0;
    margin-bottom: var(--spacing-xs);
    background: none;
    border: none;
    line-height: 1.6;
    color: var(--color-text);
    font-size: 0.9rem;
}

.modal-privacy-list li:last-child {
    margin-bottom: 0;
}

.modal-footer-note {
    border-top: 2px solid var(--serene-tint-strong);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.modal-note {
    text-align: center;
    font-size: 1rem;
    color: var(--cosmic-purple-1);
    font-weight: var(--font-weight-semibold);
    font-style: italic;
}

/* ========================================
   FEEDBACK FORM
   ======================================== */
.feedback-form {
    animation: fadeIn 0.3s ease-out;
}

.feedback-intro {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.feedback-label {
    display: block;
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-bottom: var(--spacing-xs);
}

.feedback-label .required {
    color: var(--color-secondary);
    font-weight: var(--font-weight-bold);
}

.feedback-select,
.feedback-input,
.feedback-textarea {
    width: 100%;
    padding: var(--spacing-sm);
    font-size: 0.95rem;
    font-family: var(--font-main);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background-color: white;
    color: var(--color-text);
}

.feedback-select:focus,
.feedback-input:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: var(--serene-green);
    box-shadow: 0 0 0 3px rgba(107, 203, 119, 0.1);
}

.feedback-textarea {
    resize: vertical;
    min-height: 120px;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.btn-cancel {
    background: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
}

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

.btn-submit-feedback {
    background: linear-gradient(135deg, var(--serene-green) 0%, #58ba69 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(107, 203, 119, 0.3);
    min-width: 140px;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
}

.btn-submit-feedback:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(107, 203, 119, 0.4);
}

.btn-submit-feedback:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit-feedback:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Feedback Success Message */
.feedback-success {
    text-align: center;
    padding: var(--spacing-xl) 0;
    animation: fadeIn 0.5s ease-out;
}

.feedback-success.hidden {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    background: linear-gradient(135deg, var(--serene-green), #58ba69);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    box-shadow: 0 4px 20px rgba(107, 203, 119, 0.4);
    animation: scaleIn 0.5s ease-out;
}

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

.success-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--serene-green);
    margin-bottom: var(--spacing-sm);
}

.success-text {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.btn-primary {
    background: var(--serene-green);
    color: white;
    box-shadow: 0 2px 10px rgba(107, 203, 119, 0.3);
    padding: var(--spacing-sm) var(--spacing-lg);
}

.btn-primary:hover {
    background: #58ba69;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(107, 203, 119, 0.4);
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Animated shimmer for cosmic purple text */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    .background-sun {
        width: 300px;
        height: 300px;
        opacity: 0.5;
    }

    .container {
        padding: var(--spacing-md);
    }

    .headline {
        font-size: 2rem;
    }

    .headline-stacked .hero-line {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }

    .subtitle {
        font-size: 1rem;
    }

    .thought-input {
        min-height: 100px;
        padding: var(--spacing-md);
    }

    .btn {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.95rem;
    }

    .btn-transform {
        min-width: 160px;
    }

    .result-box {
        padding: var(--spacing-lg);
    }

    .result-text {
        font-size: 1rem;
    }

    /* Increase deeper wisdom text size on tablet/mobile */
    .result-deeper-text {
        font-size: 1.05rem;
        font-weight: var(--font-weight-semibold);
        line-height: 1.85;
    }

    .info-btn {
        width: 40px;
        height: 40px;
    }

    .info-icon {
        width: 22px;
        height: 22px;
    }

    .modal-content {
        max-height: 90vh;
    }

    .modal-title {
        font-size: 1.5rem;
        padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-sm);
    }

    .modal-body {
        padding: 0 var(--spacing-lg) var(--spacing-lg);
    }

    .modal-section-title {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
    }

    .headline {
        font-size: 1.5rem;
    }

    .headline-stacked .hero-line {
        font-size: clamp(1.35rem, 7vw, 2rem);
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .button-container {
        flex-wrap: wrap;
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
        min-width: 100%;
    }

    .btn-transform {
        min-width: 100%;
    }

    .result-box {
        padding: var(--spacing-md);
    }

    .result-title {
        font-size: 1.1rem;
    }

    .result-text {
        font-size: 0.95rem;
    }

    /* Better readability for deeper wisdom on small mobile */
    .result-deeper-text {
        font-size: 1.05rem;
        font-weight: var(--font-weight-semibold);
        line-height: 1.9;
    }

    .footer {
        font-size: 0.9rem;
    }

    .info-btn {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        width: 36px;
        height: 36px;
    }

    .info-icon {
        width: 20px;
        height: 20px;
    }

    .modal-overlay {
        padding: var(--spacing-sm);
    }

    .modal-content {
        max-height: 92vh;
    }

    .modal-title {
        font-size: 1.3rem;
        padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
    }

    .modal-body {
        padding: 0 var(--spacing-md) var(--spacing-md);
    }

    .modal-section-title {
        font-size: 1rem;
    }

    .modal-section p,
    .modal-list li {
        font-size: 0.95rem;
    }

    .modal-disclaimer {
        padding: var(--spacing-sm);
    }

    .modal-disclaimer-title {
        font-size: 0.95rem;
    }

    .modal-disclaimer-text {
        font-size: 0.9rem;
    }

    .modal-privacy {
        padding: var(--spacing-sm);
    }

    .modal-privacy-title {
        font-size: 0.95rem;
    }

    .modal-privacy-text {
        font-size: 0.9rem;
    }

    .modal-privacy-list {
        padding-left: var(--spacing-md);
    }

    .modal-privacy-list li {
        font-size: 0.85rem;
    }

    .footer-feedback-btn {
        font-size: 0.85rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .feedback-actions {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .btn-cancel,
    .btn-submit-feedback {
        width: 100%;
        justify-content: center;
    }
}
