:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    text-align: center;
    padding: 60px 0 40px;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.app-icon {
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
    transition: transform 0.3s ease;
}

.app-icon:hover {
    transform: scale(1.05) rotate(5deg);
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: -0.025em;
}

header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Value Proposition Section */
.value-proposition {
    margin: 40px 0;
    text-align: center;
}

.value-proposition h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.benefits-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: nowrap;
}

.benefit-item {
    background: var(--card-background);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex: 1;
    max-width: 300px;
    min-width: 250px;
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.benefit-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.benefit-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.3;
}

/* How to Use Section */
.how-to-use {
    margin: 50px 0;
    background: var(--card-background);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.how-to-use h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: nowrap;
    margin: 30px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 180px;
    max-width: 220px;
}

.step-number {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.3;
}

.step-arrow {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: 8px 0;
    }
    
    .step {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }
    
    .benefits-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .benefit-item {
        padding: 15px;
        min-width: unset;
        max-width: unset;
    }
    
    .how-to-use {
        padding: 30px 20px;
    }
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.tech-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.tech-tag:hover {
    transform: translateY(-1px);
}

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.upload-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upload-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: scale(1.02);
}

.text-input-option {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.text-input-option h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.text-input-option textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.text-input-option textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.loading-text {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-text::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.file-drop-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.file-drop-area p {
    color: var(--text-secondary);
    font-weight: 500;
}

.browse-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.browse-link:hover {
    color: var(--primary-dark);
}

.file-info {
    margin-top: 16px;
    padding: 12px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    text-align: left;
}

.file-info strong {
    color: var(--primary-color);
}

#jobDescription {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
}

#jobDescription:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.action-section {
    text-align: center;
    margin-bottom: 48px;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

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

.primary-btn:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.secondary-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.results-section {
    animation: fadeIn 0.6s ease-in-out;
}

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

.results-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    margin-bottom: 32px;
}

.result-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.result-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.match-score-card {
    text-align: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0deg, var(--border-color) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
    transition: all 0.6s ease;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--card-background);
}

.score-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    z-index: 1;
}

.score-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.score-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.score-details div {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.score-details span {
    font-weight: 600;
    color: var(--primary-color);
}

.keywords-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.keywords-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.keywords-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keywords-title.found {
    color: var(--success-color);
}

.keywords-title.missing {
    color: var(--danger-color);
}

.keywords-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.keyword-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.keyword-item:last-child {
    border-bottom: none;
}

.keyword-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
    position: relative;
}

.keyword-tag.found {
    background: #ecfdf5;
    color: var(--success-color);
    border-color: #a7f3d0;
}

.keyword-tag.missing {
    background: #fef2f2;
    color: var(--danger-color);
    border-color: #fecaca;
}

.keyword-tag.high-priority {
    border-left: 4px solid #dc2626;
    font-weight: 600;
}

.keyword-tag.med-priority {
    border-left: 4px solid #d97706;
}

.keyword-tag.low-priority {
    border-left: 4px solid #64748b;
}

.keyword-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.keyword-category {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.keyword-section {
    background: #e0f2fe;
    color: #0277bd;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.7rem;
}

.keyword-priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.7rem;
}

.keyword-priority.critical {
    background: #fee2e2;
    color: #dc2626;
}

.keyword-priority.high {
    background: #fef3c7;
    color: #d97706;
}

.keyword-priority.medium {
    background: #e0f2fe;
    color: #0277bd;
}

.keyword-priority.low {
    background: #f3f4f6;
    color: #6b7280;
}

.keyword-suggestions {
    color: #6366f1;
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.keyword-suggestions:hover {
    color: #4f46e5;
}

.cover-letter-section {
    margin-bottom: 32px;
}

.cover-letter-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.cover-letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.cover-letter-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.cover-letter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tone-select, .provider-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tone-select:focus, .provider-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.generate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.api-key-section {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.api-key-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.api-key-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: monospace;
    background: var(--card-background);
}

.api-key-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.save-key-btn {
    padding: 10px 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-key-btn:hover {
    background: #047857;
}

.api-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.api-info p {
    margin: 4px 0;
}

.letter-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.cover-letter-textarea {
    width: 100%;
    min-height: 400px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    background: var(--card-background);
    color: var(--text-primary);
}

.cover-letter-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.letter-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.api-key-saved {
    background: #ecfdf5 !important;
    border-color: var(--success-color) !important;
}

.api-key-error {
    background: #fef2f2 !important;
    border-color: var(--danger-color) !important;
}
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.api-key-section {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.api-key-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.api-key-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: monospace;
    background: var(--card-background);
}

.api-key-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.save-key-btn {
    padding: 10px 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-key-btn:hover {
    background: #047857;
}

.api-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.api-info p {
    margin: 4px 0;
}

.cover-letter-content {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.letter-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.cover-letter-textarea {
    width: 100%;
    min-height: 400px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    background: var(--card-background);
    color: var(--text-primary);
}

.cover-letter-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.letter-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.api-key-saved {
    background: #ecfdf5 !important;
    border-color: var(--success-color) !important;
}

.api-key-error {
    background: #fef2f2 !important;
    border-color: var(--danger-color) !important;
}

@media (max-width: 768px) {
    .cover-letter-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cover-letter-controls,
    .api-key-input-group,
    .letter-actions {
        flex-direction: column;
    }
    
    .api-key-input {
        min-width: auto;
    }
}
    color: var(--text-primary);
    margin: 0;
}

.loading {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

#coverLetterText {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    margin-bottom: 16px;
    background: #fafbfc;
}

#coverLetterText:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.cover-letter-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    background: #f8fafc;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.recommendations-section {
    margin-bottom: 48px;
}

.recommendations-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.recommendations-list {
    display: grid;
    gap: 16px;
}

.recommendation-item {
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    background: #eff6ff;
}

.recommendation-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.recommendation-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

footer {
    text-align: center;
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 64px;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .keywords-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .cover-letter-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .cover-letter-actions {
        flex-wrap: wrap;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: var(--success-color);
}

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

.notification.info {
    background: #2563eb;
    border-left: 4px solid #1d4ed8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsiveness for LLM cover letter generator */
@media (max-width: 768px) {
    .cover-letter-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cover-letter-controls,
    .api-key-input-group,
    .letter-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .api-key-input {
        min-width: auto;
    }
    
    .cover-letter-textarea {
        min-height: 300px;
    }
    
    .tone-select, .provider-select {
        width: 100%;
    }
    
    .generate-btn {
        width: 100%;
        justify-content: center;
    }
    
    .action-btn {
        flex: 1;
        text-align: center;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .structured-input {
        min-width: auto;
    }
    
    .api-key-input-group {
        flex-direction: column;
    }
    
    .api-key-input {
        min-width: auto;
    }
    
    .mode-toggle {
        margin-top: 10px;
    }
}

/* Info section for free cover letter generator */
.info-section {
    background: linear-gradient(135deg, #e0f7fa, #e8f5e8);
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.info-section p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.info-section p:first-child {
    font-weight: 600;
    color: #2e7d32;
}

/* Mode Toggle Switch */
.mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    width: 60px;
    height: 30px;
    background: #4caf50;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4px;
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
}

.slider:before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
    left: 4px;
}

.toggle-switch input:checked + .slider {
    background: var(--primary-color);
    justify-content: flex-end;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(30px);
}

.slider-label {
    margin-left: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* AI Mode Section */
.ai-mode-section {
    background: #f0f8ff;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.structured-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.structured-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--card-background);
}

.structured-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.structured-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--card-background);
    resize: vertical;
}

.structured-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.api-key-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.api-key-input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: monospace;
    background: var(--card-background);
}

.api-key-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.save-key-btn {
    padding: 8px 12px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-key-btn:hover {
    background: #047857;
}