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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #333;
    background: white;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    position: relative;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #194169;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

/* Advertisement Slots */
.ad-slot {
    background: linear-gradient(135deg, #e8f4fd, #d1ecf1);
    border: 1px solid #b3daff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    font-weight: 500;
    text-align: center;
    font-size: 0.85rem;
}

.ad-header {
    height: 50px;
    width: 200px;
}

.ad-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 250px;
    z-index: 100;
}

.ad-bottom {
    height: 60px;
    margin: 20px 0 10px 0;
}

/* Filter Section */
.filter-section {
    background: rgba(255, 255, 255, 0.95);
    /* padding: 20px; */
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.filter-inputs {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    gap: 15px;
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
    font-size: 0.9rem;
}

.input-group input,
.input-group textarea {
    padding: 8px 12px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 36px;
}

.input-group textarea {
    min-height: 60px;
    max-height: 80px;
}

.char-counter {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-align: right;
    margin-top: 4px;
    font-family: monospace;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter.danger {
    color: #e74c3c;
}

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

.analyze-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.analyze-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ad-header {
    width: 300px;
    height: 80px;
    font-size: 0.9rem;
}

.ad-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 250px;
    font-size: 0.8rem;
    writing-mode: vertical-rl;
    z-index: 100;
}

.ad-bottom {
    width: 100%;
    height: 100px;
    margin: 30px 0;
    font-size: 1rem;
}

.filter-section {
    background: white;
    padding:  30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.section-title {
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px 12px 0 0;
    padding: 10px 15px;
    font-weight: 600;
    color: #334155;
    font-size: 1rem;
    margin: -30px -30px 15px -30px;
}

.filter-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.input-group input,
.input-group textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.analyze-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.analyze-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
}

.analyze-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    overflow: hidden;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background: rgba(248, 250, 252, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: background-color 0.2s ease;
}

.upload-header:hover {
    background: rgba(241, 245, 249, 0.9);
}

.upload-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #334155;
    gap: 8px;
}


.collapse-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
    color: #64748b;
}

.upload-section.collapsed .collapse-arrow {
    transform: rotate(-270deg);
}

.upload-summary {
    font-size: 0.9rem;
    color: #64748b;
}

.drag-drop-area {
    border: 2px dashed #4ecdc4;
    border-radius: 12px;
    padding: 25px;
    margin: 15px 20px 20px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f0fdfa, #f0faf8);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.upload-section.collapsed .drag-drop-area {
    display: none;
}

.upload-section.collapsed {
    margin-bottom: 10px;
}

.upload-section.collapsed .upload-header {
    border-bottom: none;
}

.drag-drop-area.drag-over {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #4ecdc4;
    transition: all 0.3s ease;
}

.drag-drop-area:hover .upload-icon {
    color: #38b2ac;
    transform: scale(1.05);
}

.drag-drop-area h3 {
    color: #0f766e;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.drag-drop-area p {
    color: #64748b;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.file-info {
    font-size: 0.85rem;
    color: #475569;
}

#fileInput {
    display: none;
}

.browse-btn {
    background: linear-gradient(135deg, #45b7d1, #3490dc);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.browse-btn:hover {
    background: linear-gradient(135deg, #3490dc, #2779bd);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(69, 183, 209, 0.3);
}

/* File List */
.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
}

.file-name {
    font-weight: 500;
    color: #334155;
    font-size: 0.9rem;
}

.file-size {
    color: #64748b;
    font-size: 0.8rem;
}

.remove-file {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    width: 0%;
    transition: width 0.3s ease;
}

/* Results Section */
.results-section {
    margin-bottom: 15px;
}

.results-stats {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #0f5132;
    padding: 10px;
    background: linear-gradient(135deg, #d1e7dd, #a3cfbb);
    border-radius: 8px;
    border: 1px solid #a3cfbb;
}

/* CV Grid */
.cv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
    margin-right: 140px; /* Space for sidebar ad */
}

.cv-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #5a65ff;
}

.cv-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cv-card h3 {
    color: #5a65ff;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.contact-info {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.contact-info p {
    margin-bottom: 3px;
    font-size: 0.85rem;
    color: #475569;
}

.professional-summary,
.personality-analysis {
    margin-bottom: 12px;
}

.professional-summary h4,
.personality-analysis h4 {
    color: #334155;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

.professional-summary p,
.personality-analysis p {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

/* Score Bars */
.score-section {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.score-bar {
    margin-bottom: 8px;
}

.score-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.score-progress {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.score-fill {
    height: 100%;
    transition: width 0.8s ease;
}

.score-fill.green {
    background: linear-gradient(90deg, #4ecdc4, #38b2ac);
}

.score-fill.red {
    background: linear-gradient(90deg, #ff6b6b, #e53e3e);
}

.score-fill.blue {
    background: linear-gradient(90deg, #45b7d1, #3490dc);
}

/* Reasoning Section */
.reasoning-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.reasoning-section h4 {
    color: #374151;
    font-size: 0.85rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.reasoning-group {
    margin-bottom: 6px;
}

.reasoning-group.positive {
    margin-bottom: 8px;
}

.reasoning-tag {
    display: inline-block;
    padding: 3px 6px;
    margin: 1px 3px 1px 0;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reasoning-tag.positive {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.reasoning-tag.negative {
    background: linear-gradient(135deg, #fed7d7, #fbb6ce);
    color: #742a2a;
    border: 1px solid #fbb6ce;
}

@media (max-width: 1200px) {
    .cv-grid {
        margin-right: 0;
    }
    
    .ad-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .filter-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        padding: 10px 15px;
        margin-bottom: 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .ad-header {
        margin-top: 10px;
        width: 100%;
        height: 40px;
    }
    
    .cv-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .container {
        padding: 8px 12px;
    }
    
    .upload-section,

    .loading-section {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .cv-card {
        padding: 15px;
    }
}

.cv-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.cv-card:nth-child(1) { animation-delay: 0.1s; }
.cv-card:nth-child(2) { animation-delay: 0.2s; }
.cv-card:nth-child(3) { animation-delay: 0.3s; }
.cv-card:nth-child(4) { animation-delay: 0.4s; }
.cv-card:nth-child(5) { animation-delay: 0.5s; }

.seo-footer {
    margin-top: 50px;
    padding: 40px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #007acc;
    margin-bottom: 15px;
}

.footer-section p {
    color: #666;
    line-height: 1.6;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-column h4 {
    color: #333;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    color: #666;
    line-height: 1.8;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #666;
}

.footer-bottom p {
    margin: 20px 0;
}

.footer-bottom p:last-child {
    font-size: 0.9em;
    margin-top: 10px;
}

.why-free-info{
    text-align: center;
}

.buy-me-coffee-link {
    display: inline-flex !important;
    align-items: center;
    background: linear-gradient(135deg, #FFDD00, #FBB040) !important;
    color: #000 !important;
    text-decoration: none !important;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    margin-left: 8px;
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.3);
    transition: all 0.3s ease;
    border: none;
    text-transform: none;
}

.buy-me-coffee-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 221, 0, 0.4);
    text-decoration: none !important;
    color: #000 !important;
}

.tagline {
    color: #666 !important;
    font-size: 1.1em;
    margin-top: 10px;
}

.upload-status {
    margin-top: 15px;
    font-weight: 500;
    color: #007bff;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .seo-footer {
        padding: 30px 15px;
    }
    
    .buy-me-coffee-link {
        margin-left: 0;
        margin-top: 10px;
        display: block !important;
        text-align: center;
        width: fit-content;
        margin: 10px auto 0;
    }
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: #6c757d !important;
}

.upload-icon i {
    font-size: 3rem;
    color: #007acc;
    margin-bottom: 15px;
}

.collapse-arrow i {
    transition: transform 0.3s ease;
    color: #007acc;
}

.collapse-arrow.expanded i {
    transform: rotate(180deg);
}

.buy-me-coffee-link i {
    margin-right: 8px;
    font-size: 16px;
}
