/* Cover Letter Styles */
.cover-letter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f8fafc;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2.5rem;
    background: white;
    border-radius: 24px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0;
    border-bottom: none;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-align: center;
}

.hero-content p {
    font-size: 1.25rem;
    color: #475569;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
}

/* Upload Section */
.upload-section {
    margin-top: 2rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.upload-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.upload-card:hover {
    transform: translateY(-2px);
}

.upload-icon {
    width: 3rem;
    height: 3rem;
    background: #eff6ff;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.upload-icon i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.upload-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.upload-card p {
    color: #64748b;
    margin-bottom: 1rem;
}

/* Upload Area Styles */
.upload-area {
    position: relative;
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    transition: all 1s linear;
    cursor: pointer;
    margin-bottom: 2.5rem;
    overflow: hidden;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.02);
    transform-origin: center;
    will-change: transform, opacity;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #2563eb, #1d4ed8);
    border-radius: 4px 4px 0 0;
}

.upload-area::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-area:hover::after {
    opacity: 1;
}

.upload-area i {
    font-size: 3rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.upload-area:hover i {
    transform: scale(1.1);
}

.upload-area h3 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.upload-area p {
    color: #64748b;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.upload-area .file-input {
    display: none;
}

.upload-area .upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.upload-area .upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.upload-area .upload-btn i {
    font-size: 1rem;
    margin: 0;
    background: none;
    -webkit-text-fill-color: white;
}

.selected-cv-container {
    margin-top: 1rem;
    display: none;
}

.selected-cv-container:empty {
    display: none;
}

.file-info {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 1s linear;
    transform-origin: top;
    opacity: 0;
    will-change: transform, opacity;
}

.file-info.visible {
    display: flex;
    animation: fadeSlideIn 1s linear forwards;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e293b;
    font-weight: 500;
}

.file-name::before {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%233b82f6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.remove-file {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(56, 161, 105, 0.2);
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.remove-file:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.05);
}

.remove-file i {
    font-size: 1rem;
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }
    20% {
        opacity: 0;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Generate Button */
.generate-section {
    text-align: center;
    margin-top: 2rem;
}

/* Generate Button Styles */
.generate-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    overflow: hidden;
    min-width: 360px;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

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

.btn-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.btn-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    font-size: 1.75rem;
    color: white;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.btn-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.btn-subtitle {
    font-size: 1.05rem;
    opacity: 0.85;
    line-height: 1.2;
}

.btn-arrow {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.generate-btn:hover .btn-arrow {
    transform: translateX(6px);
}

.btn-arrow i {
    color: white;
    font-size: 1.5rem;
}

/* Result Section Styles */
.result-section {
    margin-top: 2rem;
    display: none;
}

.result-section.visible {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.results-header h2 i {
    color: #3b82f6;
    background: #eff6ff;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 1.25rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
}

.result-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.card-header h3 i {
    color: #3b82f6;
    background: #eff6ff;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 1.25rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: white;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1px);
}

.action-btn.primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.action-btn.primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.action-btn i {
    font-size: 0.875rem;
}

/* Cover Letter Preview Styles */
.preview-container {
    position: relative;
    min-height: 400px;
    background: white;
}

.preview-container .loading-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

.preview-container .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.preview-container .loading-state p {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.preview-content {
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
}

/* Clean, modern border styling - Top-tier tech company approach */
.document-viewer .preview-content {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.95) !important;
    position: relative;
    margin: 0.25rem !important;
    padding: 1rem !important;
    transition: all 0.2s ease;
}

.document-viewer .preview-content:hover {
    border-color: rgba(59, 130, 246, 0.15) !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 12px 32px rgba(59, 130, 246, 0.08),
        0 0 0 1px rgba(59, 130, 246, 0.08) !important;
    transform: translateY(-1px);
}

.document-viewer .preview-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.003) 0%, 
        rgba(139, 92, 246, 0.002) 100%);
    border-radius: 11px;
    z-index: -1;
    pointer-events: none;
}

/* Cover Letter Content Styles */
.cover-letter {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    line-height: 1.6;
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cover-letter-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info .name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.date {
    font-size: 0.875rem;
    color: #64748b;
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.cover-letter-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cover-letter-body p {
    margin: 0;
}

.recipient {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.8;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.greeting {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.content {
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
}

.closing {
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
    margin-top: 1rem;
}

/* Edit Mode Styles */
.preview-container.editing .preview-content {
    padding: 1rem;
}

.preview-container.editing .cover-letter {
    background: #f8fafc;
    padding: 3rem;
    border-radius: 1rem;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
}

.preview-container.editing .cover-letter * {
    outline: none;
}

.preview-container.editing .cover-letter p {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.preview-container.editing .cover-letter p:hover {
    background: rgba(59, 130, 246, 0.05);
}

.preview-container.editing .cover-letter p:focus {
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .cover-letter-container {
        padding: 1rem;
    }

    .upload-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .upload-card {
        padding: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Hero section mobile styles */
    .letter-animation {
        max-width: 100%;
    }
    
    .what-you-get-label {
        font-size: 0.875rem;
    }
    
    .output-visualization {
        gap: 1rem;
        flex-direction: column;
    }
    
    .output-label {
        font-size: 0.75rem;
    }
    
    .cover-letter-icon, .analysis-icon {
        width: 70px;
        height: 70px;
    }
    
    .cover-letter-icon i, .analysis-icon i {
        font-size: 1.6rem;
    }
    
    .plus-connector {
        width: 30px;
        height: 30px;
        transform: rotate(90deg);
    }
    
    .plus-connector i {
        font-size: 1rem;
    }
}

/* Form Sections */
section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

section h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Job Description Section */
.job-description-section {
    margin-bottom: 2rem;
}

.job-description-section h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.job-input-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.job-description-input {
    flex: 1;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}

.analyze-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analyze-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Generated Cover Letter Section */
.generated-letter-section {
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.letter-actions {
    display: flex;
    gap: 1rem;
}

.action-btn.primary {
    background: #3b82f6;
    color: white;
    border: none;
}

.action-btn.secondary {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.letter-content {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.letter-content .header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.letter-content .contact-info {
    text-align: left;
}

.letter-content .contact-info p {
    margin: 5px 0;
}

.letter-content .date {
    text-align: right;
}

.letter-content .recipient {
    margin-bottom: 20px;
}

.letter-content .recipient p {
    margin: 5px 0;
}

.letter-content .body {
    margin: 20px 0;
}

.letter-content .body p {
    margin: 10px 0;
}

.letter-content .closing {
    margin-top: 40px;
}

.letter-content .closing p {
    margin: 5px 0;
}

/* Remove redundant styles */
.cover-letter-preview,
.preview-header,
.preview-actions {
    display: none;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Error States */
.error {
    border-color: #ef4444 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Success States */
.success {
    border-color: #22c55e !important;
}

.success-message {
    color: #22c55e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Header Styles */
.main-header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.header-left h1 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #1e293b;
    margin: 0;
}

.header-left p {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
}

.header-right {
    margin-left: auto !important;
    padding-left: 2rem !important;
}

.user-profile {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 0.75rem 1.25rem !important;
    background: #f8fafc !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
}

.user-profile:hover {
    background: #f1f5f9 !important;
    transform: translateY(-1px) !important;
}

/* Letter Animation */
.letter-animation {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.what-you-get-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.what-you-get-label {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.output-visualization {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    flex-wrap: nowrap;
}

.output-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-height: 140px;
    justify-content: flex-start;
}

.output-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.output-item:hover .output-label {
    opacity: 1;
    color: #1e293b;
}

.cover-letter-icon, .analysis-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 3px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    animation: fadeInScale 0.8s ease-out forwards;
}

.cover-letter-icon {
    animation-delay: 0.2s;
    border-color: rgba(168, 85, 247, 0.2);
}

.analysis-icon {
    animation-delay: 0.6s;
    border-color: rgba(16, 185, 129, 0.2);
}

.cover-letter-icon i, .analysis-icon i {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.cover-letter-icon i {
    color: #a855f7;
}

.analysis-icon i {
    color: #10b981;
}

.plus-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInScale 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

.plus-connector i {
    font-size: 1.2rem;
    font-weight: bold;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.letter-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.letter-icon i {
    font-size: 2.5rem;
    color: #059669;
}

/* Glow Animation */
.glow-icon {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(107, 114, 128, 0.5); }
    50% { box-shadow: 0 0 20px rgba(107, 114, 128, 0.8); }
}

/* Remove old wave animations */
.letter-waves {
    display: none;
}

/* Original Envelope Version */
.letter-icon i {
    font-size: 2.5rem;
    color: #3b82f6;
}

/* Document Version */
.document-icon {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.document-icon i {
    font-size: 2.5rem;
    color: #2563eb;
}

/* Pen Version */
.pen-icon {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
}

.pen-icon i {
    font-size: 2.5rem;
    color: #db2777;
}

/* Briefcase Version */
.briefcase-icon {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.briefcase-icon i {
    font-size: 2.5rem;
    color: #16a34a;
}

/* Magic Wand Version */
.magic-icon {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.magic-icon i {
    font-size: 2.5rem;
    color: #7c3aed;
}

/* Wave Animation */
.letter-waves {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid currentColor;
    border-radius: 50%;
    animation: wave 2s infinite;
}

@keyframes wave {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.letter-waves::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid currentColor;
    border-radius: 50%;
    animation: wave 2s infinite 0.5s;
}

/* CV Options Container Styles */
.cv-options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cv-option-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.cv-option-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.cv-option-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cv-option-header i {
    color: #3b82f6;
    background: #eff6ff;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.cv-option-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.cv-option-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0;
}

.cv-option-divider::before,
.cv-option-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.cv-option-divider span {
    padding: 0 1rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Job Details Form Styles */
.job-details-form {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.job-details-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #2563eb, #1d4ed8);
    border-radius: 4px 4px 0 0;
}

.job-details-form h3 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.job-details-form h3 i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    font-size: 0.9375rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

/* Revolutionary Upload and Job Description Areas */

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-badge {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    position: relative;
}

.icon-badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icon-badge:hover::before {
    opacity: 1;
}

.icon-badge i {
    font-size: 1.5rem;
    color: white;
}

.header-text h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.25rem 0;
    background: linear-gradient(135deg, #1a202c, #2d3748);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-text p {
    color: #718096;
    margin: 0;
    font-size: 0.95rem;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: #e2e8f0;
    color: #94a3b8;
}

.step.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.step.completed {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.4);
}

.connector {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.connector.active {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

/* CV Upload Section */
.cv-upload-section {
    margin-bottom: 3rem;
}

.upload-container {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.upload-zone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 1.5rem 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
}

.upload-zone:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    transform: translateY(-1px);
}

.upload-zone.loading {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    pointer-events: none;
}

.upload-zone.loading .upload-icon {
    animation: pulse 1.5s infinite;
}

.upload-zone.success {
    background: #f0fdf4;
    border-color: #86efac;
}

.upload-zone.success .upload-icon {
    background: #dcfce7;
}

.upload-zone.success .upload-icon i {
    color: #22c55e;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.upload-visual {
    margin-bottom: 2rem;
}

.upload-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.upload-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.upload-icon i {
    font-size: 2rem;
    color: white;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-ring-circle {
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
}

.progress-ring-fill {
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.3s ease;
}

.upload-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: #718096;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.secondary-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.file-input {
    display: none;
}

.upload-status {
    margin-top: 1.5rem;
    display: none;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.upload-status.visible {
    display: flex;
    justify-content: center;
    animation: slideInUp 0.4s ease-out;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
    border: 1px solid #9ae6b4;
    border-radius: 16px;
    color: #22543d;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.15);
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 500px;
    width: 100%;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 161, 105, 0.2);
}

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

.status-item i {
    color: #38a169;
}

/* Job Description Section */
.job-description-section {
    margin-bottom: 3rem;
}

.job-form-container {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-card {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-icon {
    position: absolute;
    top: -12px;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.card-icon i {
    color: white;
    font-size: 1rem;
}

.form-field {
    position: relative;
}

.form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-field input {
    width: 100%;
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    color: #1a202c;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.field-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.form-field input:focus + .field-decoration {
    width: 100%;
}

/* Field Info and Word Limits */
.field-info {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.word-limit {
    font-size: 0.75rem;
    color: #64748b;
    transition: color 0.3s ease;
}

.word-limit.warning {
    color: #f59e0b;
}

.word-limit.error {
    color: #ef4444;
}

/* Description Card */
.description-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.description-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.card-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.25rem 0;
}

.card-title p {
    color: #718096;
    margin: 0;
    font-size: 0.875rem;
}

.textarea-container {
    position: relative;
}

.textarea-container textarea {
    width: 100%;
    min-height: 300px;
    padding: 1.5rem;
    border: none;
    background: white;
    font-size: 0.95rem;
    color: #1a202c;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.textarea-container textarea:focus {
    outline: none;
}

.textarea-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.word-count {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
    transition: color 0.3s ease;
}

.word-count.warning {
    color: #f59e0b;
}

.word-count.error {
    color: #ef4444;
}

.format-tools {
    display: flex;
    gap: 0.5rem;
}

.tool-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #718096;
}

.tool-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Generate Section */
.generate-section {
    margin-top: 3rem;
}

.generate-container {
    display: flex;
    justify-content: center;
}

.generate-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    overflow: hidden;
    min-width: 360px;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

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

.btn-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.btn-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    font-size: 1.75rem;
    color: white;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.btn-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.btn-subtitle {
    font-size: 1.05rem;
    opacity: 0.85;
    line-height: 1.2;
}

.btn-arrow {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.generate-btn:hover .btn-arrow {
    transform: translateX(6px);
}

.btn-arrow i {
    color: white;
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-actions {
        flex-direction: column;
    }
    
    .generate-btn {
        min-width: auto;
        width: 100%;
    }
    
    .btn-content {
        justify-content: center;
    }
    
    .btn-text {
        align-items: center;
        text-align: center;
    }
}

/* Revolutionary Results Section */
.result-section {
    margin-top: 3rem;
    display: none;
}

.result-section.visible {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

/* Results Hero Section */
.results-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.results-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon i {
    font-size: 0.75rem;
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: white !important;
    margin: 0 0 2rem 0;
    line-height: 1.5;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: white !important;
}

.stat-label {
    font-size: 0.875rem;
    color: white !important;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* Hero Actions */
.hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.action-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.primary-actions {
    justify-content: flex-start;
}

.secondary-actions {
    justify-content: flex-start;
}

.hero-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 160px;
}

.hero-btn.primary {
    background: rgba(255, 255, 255, 0.95);
    color: #1a202c !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-btn.primary .btn-content {
    color: #1a202c !important;
}

.hero-btn.primary .btn-title,
.hero-btn.primary .btn-subtitle {
    color: #1a202c !important;
}

.hero-btn.primary:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-btn .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.hero-btn.primary .btn-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.hero-btn.secondary .btn-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hero-btn .btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.btn-subtitle {
    font-size: 0.875rem;
    opacity: 0.7;
    line-height: 1.2;
}

.tool-action {
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.tool-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tool-action i {
    font-size: 1.125rem;
}

/* Results Container */
.results-container {
    display: flex;
    justify-content: center;
    align-items: start;
}

.results-main.centered {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Results Sidebar */
.results-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 1.5rem 0;
}

.sidebar-title i {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

/* Analysis Cards */
.analysis-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.analysis-card {
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.analysis-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0;
    background: none;
    border: none;
}

.analysis-card .card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.card-icon.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.card-icon.warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.card-icon.info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.card-info {
    flex: 1;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.card-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
}

.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Suggestions */
.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.suggestion-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.suggestion-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
}

.suggestion-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.suggestion-desc {
    font-size: 0.8125rem;
    color: #718096;
    line-height: 1.4;
}

/* Document Container */
.results-main {
    min-height: 800px;
}

.document-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 1rem 1rem 0 0;
}

.document-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.document-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.document-title::before {
    content: '';
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.document-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Align all action buttons in a single row */
.document-header .document-controls {
    margin-left: auto;
    margin-top: 0.5rem;
}

.document-actions .hero-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    flex: 1;
    max-width: 180px;
    position: relative;
    overflow: hidden;
}

.document-actions .hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.document-actions .hero-btn:hover::before {
    left: 100%;
}

.document-actions .hero-btn.primary {
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.document-actions .hero-btn.primary .btn-title,
.document-actions .hero-btn.primary .btn-subtitle {
    color: white !important;
}

.document-actions .hero-btn.primary .btn-subtitle {
    opacity: 0.9;
}

.document-actions .hero-btn.primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.document-actions .hero-btn.secondary {
    background: white;
    color: #111827;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.document-actions .hero-btn.secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.document-actions .hero-btn.secondary .btn-title {
    color: #111827;
    font-weight: 600;
}

.document-actions .hero-btn.secondary .btn-subtitle {
    color: #4b5563;
}

.document-actions .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
}

.document-actions .hero-btn.primary .btn-icon {
    background: rgba(255, 255, 255, 0.15);
}

.document-actions .hero-btn.secondary .btn-icon {
    background: #f1f5f9;
}

.document-actions .hero-btn.primary .btn-icon i {
    font-size: 0.875rem;
    color: white;
}

.document-actions .hero-btn.secondary .btn-icon i {
    font-size: 0.875rem;
    color: #3b82f6;
}

.document-actions .btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.document-actions .btn-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.document-actions .btn-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    line-height: 1.2;
}

.document-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 1rem;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    color: var(--color-text-light);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.view-btn:hover {
    background: var(--color-background);
    color: var(--color-primary);
}

.view-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.view-btn i {
    font-size: 1rem;
}

.view-btn-text {
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .document-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .document-actions {
        width: 100%;
        justify-content: center;
    }
    
    .document-actions .hero-btn {
        max-width: none;
        flex: 1;
    }
    
    .document-controls {
        width: 100%;
        justify-content: center;
    }
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
}

.meta-item i {
    color: #667eea;
}

.document-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.25rem;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
}

.zoom-btn:hover {
    background: #f1f5f9;
    color: #667eea;
}

.zoom-level {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
    min-width: 40px;
    text-align: center;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Modern view buttons that match the hero button style */
.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
}

.view-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.view-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.view-btn i {
    font-size: 0.875rem;
}

.view-btn-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Premium Document Viewer - Main Styles */
.document-viewer {
    background: transparent;
    padding: 0;
    min-height: auto;
    border-radius: 0;
    display: flex;
    justify-content: center;
}

.document-page {
    max-width: 850px;
    width: 100%;
    background: #ffffff;
    border-radius: 0;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 20px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e5e7eb;
    position: relative;
}



.document-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    z-index: 1;
}

.page-content {
    padding: 3rem 3.5rem;
    position: relative;
    z-index: 2;
    background: #ffffff;
}

/* Premium Cover Letter Document */
.cover-letter-document {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.75;
    color: #111827;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    /* Premium Border Styling */
    border: 3px solid transparent;
    border-image: linear-gradient(135deg, #3b82f6, #8b5cf6, #f59e0b, #3b82f6) 1;
    border-radius: 16px;
    background: 
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #3b82f6, #8b5cf6, #f59e0b, #3b82f6) border-box;
    padding: 2.5rem;
    box-shadow: 
        0 0 0 1px rgba(59, 130, 246, 0.1),
        0 4px 24px rgba(59, 130, 246, 0.12),
        0 12px 48px rgba(139, 92, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.cover-letter-document::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.02) 0%, 
        rgba(139, 92, 246, 0.01) 50%, 
        rgba(245, 158, 11, 0.02) 100%);
    border-radius: 13px;
    z-index: -1;
}

.document-letterhead {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.document-letterhead::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
}

.letterhead-left {
    flex: 1;
}

.contact-name {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #111827, #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
}

.contact-item i {
    width: 16px;
    color: #3b82f6;
    font-size: 0.875rem;
}

.letterhead-right {
    flex-shrink: 0;
}

.date-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    letter-spacing: -0.01em;
}

.date-badge i {
    font-size: 0.875rem;
}

.document-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.recipient-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.75rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.recipient-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}

.recipient-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.recipient-company {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.recipient-address {
    font-size: 0.95rem;
    color: #6b7280;
}

.letter-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.greeting {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.01em;
}

.content-paragraph {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
    text-align: left;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.closing {
    margin-top: 1rem;
}

.closing-text {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.signature {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .results-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .results-sidebar {
        order: 2;
    }
    
    .results-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .results-hero {
        padding: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        justify-content: center;
        text-align: center;
    }
    
    .stat-divider {
        display: none;
    }
    
    .action-group {
        justify-content: center;
    }
    
    .document-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .document-controls {
        justify-content: space-between;
    }
    
    /* Premium Mobile Document Styles */
    .document-page {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .page-content {
        padding: 2rem 1.5rem;
    }
    
    .document-letterhead {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        margin-bottom: 2.5rem;
    }
    
    .contact-name {
        font-size: 1.625rem;
    }
    
    .date-badge {
        align-self: flex-start;
        padding: 0.625rem 1rem;
    }
    
    .recipient-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .letter-content {
        gap: 1.25rem;
    }
    
    .preview-content .letter-paragraph {
        margin-bottom: 1.5rem;
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .document-letterhead {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-content {
        padding: 2rem;
    }
}

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

/* View mode styles */
.document-viewer.edit-mode .cover-letter-document {
    border: 2px dashed rgba(59, 130, 246, 0.3);
    position: relative;
}

.document-viewer.edit-mode .cover-letter-document::before {
    content: "✏️ Edit Mode - Click on text to edit";
    position: absolute;
    top: -40px;
    left: 0;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    z-index: 10;
}

/* Fullscreen Mode - Complete Rebuild */
.document-viewer.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.document-viewer.fullscreen-mode .document-page {
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.document-viewer.fullscreen-mode .page-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.document-viewer.fullscreen-mode .preview-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px;
    background: white;
    position: relative;
}

/* Scrollbar styles for fullscreen */
.document-viewer.fullscreen-mode .preview-content::-webkit-scrollbar {
    width: 14px;
}

.document-viewer.fullscreen-mode .preview-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 7px;
}

.document-viewer.fullscreen-mode .preview-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 7px;
    border: 2px solid #f1f1f1;
}

.document-viewer.fullscreen-mode .preview-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar */
.document-viewer.fullscreen-mode .preview-content {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* Close button */
.document-viewer.fullscreen-mode::after {
    content: "✕";
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
}

.document-viewer.fullscreen-mode::after:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Exit hint */
.document-viewer.fullscreen-mode::before {
    content: "Press ESC or click outside to exit";
    position: absolute;
    top: 80px;
    right: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 10001;
    animation: fadeInOut 4s ease-in-out;
    pointer-events: none;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    25%, 75% { opacity: 1; }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .document-viewer.fullscreen-mode .document-page {
        width: 95%;
        height: 95vh;
    }
    
    .document-viewer.fullscreen-mode .preview-content {
        padding: 20px;
    }
    
    .document-viewer.fullscreen-mode::after {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .document-viewer.fullscreen-mode::before {
        top: 60px;
        right: 15px;
        font-size: 11px;
        padding: 6px 12px;
    }
}





/* Edit mode enhancements */
.document-viewer.edit-mode [contenteditable="true"] {
    cursor: text;
    transition: all 0.2s ease;
}

.document-viewer.edit-mode [contenteditable="true"]:hover {
    background-color: rgba(59, 130, 246, 0.05);
    border-radius: 4px;
}

.document-viewer.edit-mode [contenteditable="true"]:focus {
    background-color: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}



.hero-actions .document-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.hero-actions .meta-item {
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-actions .meta-item i {
    color: white;
    font-size: 1rem;
}

.document-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.document-actions .hero-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
}

.document-actions .hero-btn.primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.document-actions .hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.document-actions .hero-btn.secondary {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.document-actions .hero-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.document-actions .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
}

.document-actions .hero-btn.secondary .btn-icon {
    background: #f1f5f9;
    color: #3b82f6;
}

.document-actions .btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.document-actions .btn-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.document-actions .btn-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
}

.document-actions .hero-btn.primary .btn-title {
    color: white;
    font-weight: 600;
}

.document-actions .hero-btn.primary .btn-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* Humanized Stamp */
.humanized-stamp {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #34d399, #059669);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    position: relative;
    box-shadow: 0 3px 6px rgba(16, 185, 129, 0.2);
    letter-spacing: 0.3px;
    z-index: 1000;
    white-space: nowrap;
    margin-right: 10px;
    text-transform: none;
}

.humanized-stamp i {
    margin-left: 4px;
    font-size: 0.65rem;
    opacity: 0.9;
}

.humanized-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 0.75rem;
    color: #374151;
    width: max-content;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    z-index: 10;
    border: 1px solid #e5e7eb;
}

.has-tooltip:hover .humanized-tooltip {
    opacity: 1;
    visibility: visible;
}

.humanized-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

@media (max-width: 768px) {
    .humanized-stamp {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    .humanized-stamp i {
        margin-left: 2px;
        font-size: 0.55rem;
    }
    
    .humanized-tooltip {
        width: 200px;
        font-size: 0.7rem;
    }
}

/* Tooltip styles */
.has-tooltip {
    position: relative;
    cursor: help;
}

.humanized-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 0.75rem;
    color: #374151;
    width: max-content;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 9999;
    border: 1px solid #e5e7eb;
    pointer-events: none;
}

.has-tooltip:hover .humanized-tooltip {
    opacity: 1;
    visibility: visible;
}

.humanized-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

@media (max-width: 768px) {
    .humanized-tooltip {
        width: 200px;
        font-size: 0.7rem;
    }
}

.has-tooltip .fa-info-circle {
    margin-left: 4px;
    font-size: 0.75rem;
    opacity: 0.8;
    color: inherit;
}

/* CV Selector Container */
.cv-selector-container {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
}

.cv-selector-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 20px;
}

.selector-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.selector-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.selector-icon i {
    font-size: 1.25rem;
    color: white;
}

.selector-content h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.selector-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.9rem;
}

/* Custom Dropdown */
.custom-dropdown {
    position: relative;
    z-index: 1;
}

.dropdown-trigger {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid transparent;
}

.dropdown-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-trigger.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.trigger-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.trigger-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
}

.trigger-icon i {
    color: white;
    font-size: 1.1rem;
}

.trigger-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.main-text {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.2;
}

.sub-text {
    font-size: 0.8rem;
    color: #718096;
    line-height: 1.2;
}

.trigger-arrow {
    width: 32px;
    height: 32px;
    background: #f7fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.trigger-arrow i {
    color: #4a5568;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown-trigger.active .trigger-arrow {
    background: #667eea;
}

.dropdown-trigger.active .trigger-arrow i {
    color: white;
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-search {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.875rem;
}

.search-container input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dropdown-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 0.375rem;
}

.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Option Items */
.option-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.125rem;
}

.option-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateX(4px);
}

.option-item.selected {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.option-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    flex-shrink: 0;
}

.option-icon i {
    font-size: 0.875rem;
    color: #475569;
}

.option-icon.upload-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.option-icon.upload-icon i {
    color: white;
}

.option-content {
    flex: 1;
    min-width: 0;
}

.option-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.option-meta {
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.3;
}

.option-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.option-item.selected .option-status {
    opacity: 1;
}

.option-status i {
    color: #64748b;
    font-size: 0.875rem;
}

.option-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.option-item:hover .option-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.option-arrow i {
    color: #667eea;
    font-size: 0.75rem;
}

/* Option Divider */
.option-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.75rem 0;
    padding: 0 0.875rem;
}

.option-divider::before,
.option-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.option-divider span {
    padding: 0 1rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Upload New Option */
.option-item.upload-new {
    border: 2px dashed #cbd5e1;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    margin-top: 0.5rem;
}

.option-item.upload-new:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f4ff 100%);
}

/* Upload Divider */
.upload-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #e2e8f0;
}

.upload-divider span {
    padding: 0 2rem;
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cv-selector-container {
        padding: 1.5rem;
    }
    
    .dropdown-trigger {
        padding: 1rem;
    }
    
    .trigger-icon {
        width: 36px;
        height: 36px;
    }
    
    .main-text {
        font-size: 0.9rem;
    }
    
    .sub-text {
        font-size: 0.75rem;
    }
    
    .option-item {
        padding: 0.75rem;
    }
    
    .option-title {
        font-size: 0.85rem;
    }
    
    .option-meta {
        font-size: 0.7rem;
    }
}

/* Animation keyframes */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* Loading State Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    min-height: 400px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
}

.loading-animation {
    margin-bottom: 2rem;
}

.loading-spinner {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

.loading-spinner i {
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.loading-progress {
    width: 200px;
    margin: 0 auto;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 2px;
    animation: loading-progress 3s ease-in-out infinite;
}

@keyframes loading-progress {
    0% {
        width: 0%;
        transform: translateX(-100%);
    }
    50% {
        width: 70%;
        transform: translateX(0%);
    }
    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

.loading-text h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #1f2937, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-step {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.loading-features {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1e293b;
    font-size: 1rem;
    text-align: center;
}

.loading-animation {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.loading-progress {
    width: 100%;
    max-width: 300px;
}

@keyframes fadeInSequence {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item i {
    color: #10b981;
    font-size: 0.875rem;
}

.feature-item span {
    font-weight: 500;
}

/* Premium Cover Letter Preview Styles */
.preview-content {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.preview-content .letter-paragraph {
    margin-bottom: 1.75rem;
    line-height: 1.75;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-align: left;
}

.preview-content .letter-paragraph:first-child {
    font-weight: 500;
    color: #111827;
    margin-bottom: 2rem;
}

.preview-content .letter-paragraph:last-child {
    margin-bottom: 0;
    font-weight: 400;
    color: #1f2937;
}

/* Premium Document Viewer */
.document-viewer {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    padding: 0;
    min-height: auto;
    display: flex;
    justify-content: center;
}

.document-page {
    background: #ffffff;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    min-height: auto;
    position: relative;
    overflow: hidden;
}

.document-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    z-index: 1;
}

.page-content {
    padding: 3rem 3.5rem;
    position: relative;
    z-index: 2;
    background: #ffffff;
}

.upload-area.success {
    transform: scale(0.995);
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.03),
        0 4px 6px -2px rgba(0, 0, 0, 0.02);
    transition: all 1s linear;
}

.upload-area.success .upload-content {
    opacity: 0.9;
    transform: scale(0.995);
    transition: all 1s linear;
}

/* Custom utility classes */
.text-center {
    text-align: center !important;
}

.card-title-centered {
    text-align: center !important;
    width: 100%;
    margin: 0 auto;
}

.card-title-centered h3,
.card-title-centered p {
    text-align: center !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Special centering for the card header that contains job description */
.card-header-centered {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

/* Edit mode styles */
.document-viewer.editing .preview-content {
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 0 !important;
    margin: 0 !important;
    background-color: #f8fafc;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.document-viewer.editing .preview-content * {
    cursor: text !important;
    pointer-events: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Preserve exact paragraph structure in edit mode */
.document-viewer.editing .preview-content .letter-paragraph {
    margin-bottom: 1.75rem !important;
    line-height: 1.75 !important;
    color: #1f2937 !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em !important;
    text-align: left !important;
    padding: 4px 8px;
    min-height: 24px;
}

.document-viewer.editing .preview-content .letter-paragraph:first-child {
    font-weight: 500 !important;
    color: #111827 !important;
    margin-bottom: 2rem !important;
}

.document-viewer.editing .preview-content .letter-paragraph:last-child {
    margin-bottom: 0 !important;
    font-weight: 400 !important;
    color: #1f2937 !important;
}

.document-viewer.editing .preview-content .letter-paragraph:hover,
.document-viewer.editing .preview-content .letter-paragraph:focus {
    outline: none;
    background-color: rgba(59, 130, 246, 0.05);
    border-radius: 4px;
}

/* Fallback for any p tags that don't have letter-paragraph class */
.document-viewer.editing .preview-content p {
    margin-bottom: 1.75rem !important;
    line-height: 1.75 !important;
    padding: 4px 8px;
    min-height: 24px;
}

.document-viewer.editing .preview-content p:hover,
.document-viewer.editing .preview-content p:focus {
    outline: none;
    background-color: rgba(59, 130, 246, 0.05);
    border-radius: 4px;
}

/* Edit actions */
.edit-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: auto;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}

/* Make document-actions relative so edit-actions can position relative to it */
.document-actions {
    position: relative;
}



/* Adjust the preview content padding */
.document-viewer.editing .preview-content {
    padding-bottom: 20px;
}

.edit-actions .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.edit-actions .save-btn {
    background: #3b82f6;
    color: white;
    border: 1px solid #2563eb;
}

.edit-actions .save-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.edit-actions .cancel-btn {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.edit-actions .cancel-btn:hover {
    background: #fee2e2;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.edit-actions .action-btn i {
    font-size: 0.875rem;
}



/* Add some bottom padding to the content to prevent buttons from overlapping */
.document-viewer.editing .preview-content {
    padding-bottom: 80px;
}

/* Free Account Limitation Styles */
#free-tier-banner {
    animation: slideInFromTop 0.5s ease-out;
    margin-bottom: 2rem;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#upgrade-modal {
    backdrop-filter: blur(4px);
    z-index: 9999;
}

#upgrade-modal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

/* Responsive adjustments for the banner */
@media (max-width: 768px) {
    #free-tier-banner .flex {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    #free-tier-banner .flex:first-child {
        flex-direction: row;
        text-align: left;
    }
    
    #free-tier-banner h3 {
        font-size: 0.9rem;
    }
    
    #free-tier-banner p {
        font-size: 0.8rem;
    }
}

/* Enhanced upgrade modal styling for cover letter context */
#upgrade-modal .bg-blue-50 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

#upgrade-modal .text-blue-900 {
    color: #1e3a8a;
}

#upgrade-modal .text-blue-800 {
    color: #1e40af;
}