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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f3f2ef;
    min-height: 100vh;
    padding: 0;
    color: #000000e6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1128px;
    margin: 0 auto;
    background: #f3f2ef;
    min-height: 100vh;
}

header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 24px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0a66c2;
    margin: 0;
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.nav-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1.5px solid #0a66c2;
    color: #0a66c2;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.nav-btn:hover {
    background: #e3f0f8;
    border-color: #0a66c2;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: #0a66c2;
    color: white;
    box-shadow: 0 2px 4px rgba(10, 102, 194, 0.2);
}

.nav-btn.active:hover {
    background: #004182;
    transform: translateY(-1px);
}

.page {
    display: none;
    padding: 32px 24px;
    max-width: 1128px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

.hero-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

.hero-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #000000e6;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-section p {
    font-size: 16px;
    color: #666666;
    margin-bottom: 24px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #000000e6;
    letter-spacing: -0.01em;
}

.hero-list {
    margin: 0 0 16px 18px;
    padding: 0;
    color: #000000e6;
    line-height: 1.5;
}

.hero-steps-wrapper {
    margin-top: 12px;
}

.hero-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-steps li {
    padding: 12px 0;
    font-size: 15px;
    color: #000000e6;
    line-height: 1.5;
}

.hero-steps li:before {
    content: counter(step-counter);
    counter-increment: step-counter;
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #0a66c2;
    color: white;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 600;
}

.hero-steps {
    counter-reset: step-counter;
}

h2 {
    color: #000000e6;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.helper-text {
    font-size: 15px;
    color: #666666;
    margin-bottom: 16px;
    line-height: 1.6;
    font-weight: 400;
}

.helper-list {
    margin: 0 0 12px 18px;
    padding: 0;
    color: #666666;
    line-height: 1.6;
}

.card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #000000e6;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 14px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
    background: #ffffff;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
    border-color: #0a66c2;
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

button {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: #0a66c2;
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.btn-primary:hover {
    background: #004182;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: transparent;
    color: #0a66c2;
    border: 1px solid #0a66c2;
}

.btn-secondary:hover {
    background: #e3f0f8;
}

.btn-outline {
    background: transparent;
    color: #666666;
    border: 1px solid #666666;
}

.btn-outline:hover {
    background: #f3f2ef;
    border-color: #000000e6;
    color: #000000e6;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.result-section {
    margin-top: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    position: relative;
    transition: box-shadow 0.2s ease;
}

.result-section:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
}

.result-section h3 {
    color: #000000e6;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.message-card {
    margin-bottom: 16px;
}

.message-card textarea {
    margin-bottom: 8px;
}

.copy-btn {
    padding: 8px 16px;
    background: #0a66c2;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    margin-top: 8px;
}

.copy-btn:hover {
    background: #004182;
}

.copy-btn.copied {
    background: #057642;
}

.profile-status {
    background: #e7f3ff;
    border: 1px solid #0a66c2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.profile-status p {
    color: #0a66c2;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.char-count {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.char-count.warning {
    color: #ff9800;
}

.char-count.error {
    color: #f44336;
}

#outreach-results textarea {
    min-height: 120px;
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    border-radius: 8px;
}

.result-section .btn-secondary {
    margin-top: 12px;
}

.progress-bar-container {
    margin: 16px 0;
    display: none;
}

.progress-bar-container.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #0a66c2;
    transition: width 0.3s ease;
    width: 0%;
}

.clear-fields-btn {
    margin-top: 24px;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}

.modal-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000000e6;
    letter-spacing: -0.02em;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* History */
#history-list {
    margin-top: 20px;
}

.history-item {
    padding: 24px;
    margin-bottom: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    transition: all 0.2s ease;
}

.history-item:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    transform: translateY(-1px);
}

.history-title {
    color: #0a66c2;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.history-subtext {
    font-size: 13px;
    color: #666666;
    margin: 0 0 12px;
}

.history-item .meta {
    font-size: 13px;
    color: #4a4a4a;
    margin-bottom: 12px;
}

.preview-text {
    display: block;
    margin-top: 6px;
    color: #666666;
    line-height: 1.4;
}

.history-item .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
}

.status.draft {
    background: #fff3cd;
    color: #856404;
}

.status.accepted {
    background: #d4edda;
    color: #155724;
}

.history-item button {
    margin-top: 8px;
    margin-right: 10px;
}

.history-detail {
    margin-top: 16px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.history-detail h4 {
    margin-bottom: 12px;
    color: #000000e6;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.history-detail textarea {
    min-height: 80px;
    margin-bottom: 10px;
}

/* Responsive design improvements */
@media (max-width: 768px) {
    header {
        padding: 12px 16px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .logo {
        width: 32px;
        height: 32px;
    }
    
    .page {
        padding: 20px 16px;
    }
    
    .card {
        padding: 24px;
    }
    
    .hero-section {
        padding: 24px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .result-section h3 {
        font-size: 20px;
    }
}

/* Additional polish */
.helper-list li {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.hero-list li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* Landing Page Styles */
.landing-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
    animation: fadeIn 0.6s ease-in;
    width: 100%;
}

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

.landing-logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.landing-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 8px rgba(10, 102, 194, 0.2));
}

.landing-title {
    font-size: 38px;
    font-weight: 700;
    color: #0a66c2;
    margin-bottom: 32px;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-instructions {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
    text-align: left;
    transition: box-shadow 0.3s ease;
}

.landing-instructions:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
}

.landing-instructions h2 {
    font-size: 28px;
    font-weight: 700;
    color: #000000e6;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-align: center;
}

.landing-instructions > p {
    font-size: 17px;
    color: #666666;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: center;
}

.landing-list {
    margin: 0 0 24px 0;
    padding: 0;
    list-style: none;
    color: #000000e6;
    line-height: 1.8;
}

.landing-list li {
    font-size: 16px;
    padding: 10px 0 10px 32px;
    position: relative;
}

.landing-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0a66c2;
    font-weight: 700;
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 102, 194, 0.1);
    border-radius: 50%;
}

.landing-steps-wrapper {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.landing-steps-wrapper h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #000000e6;
    letter-spacing: -0.01em;
    text-align: center;
}

.landing-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.landing-steps li {
    padding: 12px 0;
    font-size: 16px;
    color: #000000e6;
    line-height: 1.6;
    text-align: left;
}

.landing-steps li:before {
    content: counter(step-counter);
    counter-increment: step-counter;
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
    color: white;
    border-radius: 50%;
    margin-right: 16px;
    font-size: 16px;
    font-weight: 600;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.3);
}

.btn-landing {
    background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
    color: white;
    padding: 20px 56px;
    font-size: 19px;
    font-weight: 600;
    border-radius: 36px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(10, 102, 194, 0.35), 0 2px 8px rgba(10, 102, 194, 0.2);
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn-landing::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-landing:hover::before {
    width: 300px;
    height: 300px;
}

.btn-landing:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(10, 102, 194, 0.45), 0 4px 12px rgba(10, 102, 194, 0.25);
    background: linear-gradient(135deg, #004182 0%, #002d5c 100%);
}

.btn-landing:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(10, 102, 194, 0.35);
}

/* Compact helper text */
.helper-text.compact {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Hide header on landing page */
#landing-page.active ~ header,
body:has(#landing-page.active) #main-header {
    display: none;
}

/* Full-screen landing page background */
#landing-page.active {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f3f2ef 0%, #ffffff 100%);
}

/* Responsive landing page */
@media (max-width: 768px) {
    .landing-container {
        padding: 40px 16px;
    }
    
    .landing-title {
        font-size: 32px;
        margin-bottom: 32px;
    }
    
    .landing-logo {
        width: 64px;
        height: 64px;
    }
    
    .landing-instructions {
        padding: 32px 24px;
    }
    
    .landing-instructions h2 {
        font-size: 24px;
    }
    
    .btn-landing {
        padding: 16px 36px;
        font-size: 16px;
    }
}

