:root {
    --primary-navy: #0a192f;
    --primary-light: #112240;
    --accent-gold: #64ffda;
    --accent-blue: #233554;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 12px;
    --radius-lg: 24px;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, #e2e8f0 0%, var(--bg-light) 70%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(10, 25, 47, 0.05);
    color: var(--primary-navy);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(10, 25, 47, 0.1);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary-navy);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Card & Glassmorphism */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Form Elements */
.section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

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

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

label {
    display: block;
    font-weight: 500;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}



.optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(10, 25, 47, 0.1);
    background: var(--white);
}

/* File Input Styling */
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.file-input-wrapper .file-label {
    display: block;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    text-align: center;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.file-input-wrapper:hover .file-label {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: var(--radius-md);
    width: fit-content;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-navy);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1rem;
    width: 100%;
}

/* Result Section */
.paper-sheet {
    background: #fff;
    border: 1px solid #e2e8f0;
    min-height: 400px;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.letter-body {
    font-family: 'Georgia', serif;
    color: #334155;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Utilities */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Slider Styling */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.highlight-text {
    color: var(--primary-navy);
    font-weight: 700;
}

.badge-sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: var(--radius-md);
    width: fit-content;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-navy);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1rem;
    width: 100%;
}

/* Result Section */
.paper-sheet {
    background: #fff;
    border: 1px solid #e2e8f0;
    min-height: 400px;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.letter-body {
    font-family: 'Georgia', serif;
    color: #334155;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Utilities */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Slider Styling */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.highlight-text {
    color: var(--primary-navy);
    font-weight: 700;
}

.badge-sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    background: #e2e8f0;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.badge-sm.optimal {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-sm.short,
.badge-sm.long {
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.feedback-text {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.feedback-note {
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-navy);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1rem;
    width: 100%;
}

/* Result Section */
.paper-sheet {
    background: #fff;
    border: 1px solid #e2e8f0;
    min-height: 400px;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.letter-body {
    font-family: 'Georgia', serif;
    color: #334155;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Utilities */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Slider Styling */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.highlight-text {
    color: var(--primary-navy);
    font-weight: 700;
}

.badge-sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    background: #e2e8f0;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.badge-sm.optimal {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-sm.short,
.badge-sm.long {
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.feedback-text {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.feedback-note {
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-navy);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1rem;
    width: 100%;
}

/* Result Section */
.paper-sheet {
    background: #fff;
    border: 1px solid #e2e8f0;
    min-height: 400px;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.letter-body {
    font-family: 'Georgia', serif;
    color: #334155;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Utilities */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Slider Styling */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.highlight-text {
    color: var(--primary-navy);
    font-weight: 700;
}

.badge-sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    background: #e2e8f0;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.badge-sm.optimal {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-sm.short,
.badge-sm.long {
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.feedback-text {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.feedback-note {
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-navy);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1rem;
    width: 100%;
}

/* Result Section */
.paper-sheet {
    background: #fff;
    border: 1px solid #e2e8f0;
    min-height: 400px;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.letter-body {
    font-family: 'Georgia', serif;
    color: #334155;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Utilities */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Slider Styling */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.highlight-text {
    color: var(--primary-navy);
    font-weight: 700;
}

.badge-sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    background: #e2e8f0;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.badge-sm.optimal {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-sm.short,
.badge-sm.long {
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.feedback-text {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.feedback-note {
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--white);
    color: var(--primary-navy);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary-navy);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 25, 47, 0.2);
}

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

.btn-secondary {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary-navy);
    color: var(--primary-navy);
    background: rgba(10, 25, 47, 0.02);
}

.btn-text-only {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1rem;
    width: 100%;
}

/* Result Section */
.paper-sheet {
    background: #fff;
    border: 1px solid #e2e8f0;
    min-height: 400px;
    position: relative;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.letter-body {
    font-family: 'Georgia', serif;
    color: #334155;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Utilities */
.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Loader */
.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid #fff;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Slider Styling */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.highlight-text {
    color: var(--primary-navy);
    font-weight: 700;
}

.badge-sm {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    background: #e2e8f0;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.badge-sm.optimal {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-sm.short,
.badge-sm.long {
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.feedback-text {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
}

.feedback-note {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

/* Slider Styling - Ultra Thin Minimal */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    /* Match thumb height for container */
    background: transparent;
    margin: 1.5rem 0;
    cursor: pointer;

    /* Reset inherited input styles */
    border: none;
    padding: 0;
    box-shadow: none;
}

/* Webkit Track */
.slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 1px;
    background: #3b82f6;
    border-radius: 0;
    border: none;
}

/* Webkit Thumb */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #1e40af;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    margin-top: -7.5px;
    /* (1px track / 2) - (16px thumb / 2) = 0.5 - 8 = -7.5 */
    transition: transform 0.15s ease;
}

/* Firefox Track */
.slider::-moz-range-track {
    width: 100%;
    height: 1px;
    background: #3b82f6;
    border-radius: 0;
    border: none;
}

/* Firefox Thumb */
.slider::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #1e40af;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    margin-top: -7.5px;
    transition: transform 0.15s ease;
}

.slider:hover::-webkit-slider-runnable-track {
    background: #2563eb;
}

.slider:hover::-moz-range-track {
    background: #2563eb;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #1e3a8a;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: #1e3a8a;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.language-selector label {
    font-size: 0.75rem;
    margin-right: 0.4rem;
    color: var(--text-muted);
    font-weight: 500;
}

.language-dropdown {
    padding: 0.4rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
}

.language-dropdown:hover {
    border-color: var(--primary-navy);
    background: white;
}

.language-dropdown:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 2px rgba(10, 25, 47, 0.1);
}