/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    padding: 2rem 0;
    color: white;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Deployment Info */
.deployment-info {
    margin: 1rem 0 2rem 0;
    display: flex;
    justify-content: center;
}

.deployment-note {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    width: 80%;
    font-size: 0.9rem;
    line-height: 1.5;
    color: white;
    max-width: 1300px;
    text-align: center;
}

.deployment-badge {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.deployment-note a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
}

.deployment-note a:hover {
    text-decoration: underline;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

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

.upload-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.upload-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.upload-header p {
    color: #666;
    margin-bottom: 2rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background-color: #f0f4ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.browse-text {
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
}

.browse-text:hover {
    text-decoration: underline;
}

.file-info {
    font-size: 0.9rem;
    color: #888;
    margin-top: 1rem;
}

/* Selected File */
.selected-file {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2rem;
}

.file-details {
    flex: 1;
    text-align: left;
}

.file-name {
    display: block;
    font-weight: 600;
    color: #333;
}

.file-size {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

.remove-file {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #ff3742;
}

/* Analyze Button */
.analyze-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Section */
.loading-section {
    margin-bottom: 3rem;
}

.loading-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loading-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.loading-card p {
    color: #666;
    margin-bottom: 2rem;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step-text {
    font-size: 0.9rem;
    color: #666;
}

/* Results Section */
.results-section {
    margin-bottom: 3rem;
}

.results-header {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.results-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.results-header p {
    color: #666;
    margin-bottom: 1.5rem;
}

.new-search-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.new-search-btn:hover {
    background: #5a6fd8;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.job-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.job-header {
    margin-bottom: 1.5rem;
}

.company-name {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0.5rem 0;
}

.job-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.job-card.description-expanded .job-description {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-score {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.apply-btn {
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.apply-btn:hover {
    background: #27ae60;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    opacity: 0.8;
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .upload-card {
        padding: 2rem 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .progress-steps {
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .job-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .apply-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .upload-header h2 {
        font-size: 1.5rem;
    }
    
    .job-card {
        padding: 1.5rem;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
}

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

.job-card {
    animation: fadeInUp 0.6s ease forwards;
}

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