/* ATS Resume Optimizer Styles */

.ats-hero {
    padding: 60px 0 40px;
    text-align: center;
}

.ats-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.ats-hero-content .hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.ats-main {
    padding: 0 0 80px;
}

/* Input Grid */
.ats-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .ats-input-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.ats-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.ats-card:hover {
    border-color: var(--border-light);
}

.ats-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.ats-card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ats-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.ats-card-body {
    padding: 20px 24px;
}

/* Tabs */
.ats-input-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.ats-tab {
    padding: 6px 16px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.ats-tab.active {
    background: var(--accent-1);
    color: #fff;
}

.ats-tab:hover:not(.active) {
    color: var(--text-primary);
}

.ats-tab-content {
    display: none;
}

.ats-tab-content.active {
    display: block;
}

/* Textarea */
.ats-textarea {
    width: 100%;
    min-height: 320px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
}

.ats-textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.ats-textarea::placeholder {
    color: var(--text-muted);
}

/* Character Count */
.ats-char-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Dropzone */
.ats-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 48px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-input);
}

.ats-dropzone:hover,
.ats-dropzone.dragover {
    border-color: var(--accent-1);
    background: rgba(124, 58, 237, 0.05);
}

.ats-dropzone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.ats-dropzone-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.ats-dropzone-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* File Info */
.ats-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-top: 12px;
    border: 1px solid var(--border);
}

.ats-file-icon {
    font-size: 1.2rem;
}

.ats-file-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ats-file-remove {
    background: none;
    border: none;
    color: var(--error);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.ats-file-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.ats-extracted-preview {
    margin-top: 16px;
}

.ats-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Buttons */
.ats-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.ats-btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.ats-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
    color: #fff;
}

.ats-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ats-btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.ats-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.ats-btn-outline:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.ats-btn-download {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.ats-btn-download:hover {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.ats-btn-icon {
    font-size: 1.2rem;
}

/* Action Bar */
.ats-action-bar {
    text-align: center;
    margin-bottom: 40px;
}

/* Loading */
.ats-loading {
    text-align: center;
    padding: 60px 0;
}

.ats-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: atsSpin 1s linear infinite;
}

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

.ats-loading h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.ats-loading p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.ats-loading-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.ats-loading-step {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.85rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.ats-loading-step.active {
    color: var(--accent-1);
    border-color: var(--accent-1);
    background: rgba(124, 58, 237, 0.1);
}

.ats-loading-step.done {
    color: var(--success);
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

/* Score Overview */
.ats-results-header {
    margin-bottom: 32px;
}

.ats-score-main {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .ats-score-main {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
}

/* Gauge */
.ats-gauge {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.ats-gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ats-gauge-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 10;
}

.ats-gauge-fill {
    fill: none;
    stroke: url(#gaugeGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ats-gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ats-gauge-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ats-gauge-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ats-score-details {
    flex: 1;
}

.ats-score-details h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.ats-score-status {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1rem;
}

.ats-score-bar-wrapper {
    max-width: 400px;
}

.ats-score-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.ats-score-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--accent-gradient);
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section Scores */
.ats-section-scores {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.ats-section-score-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 20px;
    transition: var(--transition);
}

.ats-section-score-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.ats-ssc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ats-ssc-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.ats-ssc-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ats-status-excellent { background: rgba(16,185,129,0.15); color: #10b981; }
.ats-status-good { background: rgba(59,130,246,0.15); color: #3b82f6; }
.ats-status-fair { background: rgba(245,158,11,0.15); color: #f59e0b; }
.ats-status-poor { background: rgba(239,68,68,0.15); color: #ef4444; }

.ats-ssc-score {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.ats-ssc-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ats-ssc-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

.ats-ssc-suggestion {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Results Tabs */
.ats-results-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.ats-results-tab {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.ats-results-tab.active {
    background: var(--accent-1);
    color: #fff;
}

.ats-results-tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.ats-results-panel {
    animation: atsFadeIn 0.3s ease;
}

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

/* Comparison */
.ats-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .ats-comparison-grid {
        grid-template-columns: 1fr;
    }
}

.ats-comparison-col h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.ats-resume-preview {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ats-resume-preview.ats-optimized {
    border-color: var(--accent-1);
}

.ats-changes-legend {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.ats-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ats-badge-added {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(16,185,129,0.15);
    color: #10b981;
    font-weight: 700;
    font-size: 0.8rem;
}

.ats-badge-removed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    font-weight: 700;
    font-size: 0.8rem;
}

.ats-badge-modified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Keywords */
.ats-keywords-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .ats-keywords-grid {
        grid-template-columns: 1fr;
    }
}

.ats-keyword-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 20px;
}

.ats-keyword-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ats-kw-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
}

.ats-kw-icon.match { background: rgba(16,185,129,0.15); color: #10b981; }
.ats-kw-icon.missing { background: rgba(239,68,68,0.15); color: #ef4444; }
.ats-kw-icon.recommended { background: rgba(245,158,11,0.15); color: #f59e0b; }

.ats-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ats-keyword-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: default;
    transition: var(--transition);
}

.ats-keyword-tag:hover {
    transform: scale(1.05);
}

.ats-kw-matched {
    background: rgba(16,185,129,0.1);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.3);
}

.ats-kw-missing {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}

.ats-kw-recommended {
    background: rgba(245,158,11,0.1);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
}

/* Suggestions */
.ats-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ats-suggestion-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: var(--transition);
}

.ats-suggestion-card:hover {
    border-color: var(--border-light);
}

.ats-suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ats-suggestion-icon.high { background: rgba(239,68,68,0.15); }
.ats-suggestion-icon.medium { background: rgba(245,158,11,0.15); }
.ats-suggestion-icon.low { background: rgba(59,130,246,0.15); }

.ats-suggestion-content {
    flex: 1;
}

.ats-suggestion-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.ats-suggestion-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ats-suggestion-priority {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ats-priority-high { background: rgba(239,68,68,0.15); color: #ef4444; }
.ats-priority-medium { background: rgba(245,158,11,0.15); color: #f59e0b; }
.ats-priority-low { background: rgba(59,130,246,0.15); color: #3b82f6; }

/* Analytics */
.ats-analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ats-analytics-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .ats-analytics-grid {
        grid-template-columns: 1fr;
    }
}

.ats-analytics-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 24px;
}

.ats-analytics-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.ats-analytics-card canvas {
    max-height: 250px;
}

/* Section Bars */
.ats-bar-item {
    margin-bottom: 16px;
}

.ats-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ats-bar-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ats-bar-value {
    font-size: 0.85rem;
    font-weight: 600;
}

.ats-bar-track {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.ats-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

/* Download Section */
.ats-download-section {
    margin-top: 40px;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
}

.ats-download-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.ats-download-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Error Toast */
.ats-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1000;
    animation: atsSlideUp 0.3s ease;
    max-width: 400px;
}

.ats-toast-error {
    background: #991b1b;
    color: #fef2f2;
    border: 1px solid #ef4444;
}

.ats-toast-success {
    background: #065f46;
    color: #ecfdf5;
    border: 1px solid #10b981;
}

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

/* Scrollbar */
.ats-resume-preview::-webkit-scrollbar,
.ats-textarea::-webkit-scrollbar {
    width: 6px;
}

.ats-resume-preview::-webkit-scrollbar-track,
.ats-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.ats-resume-preview::-webkit-scrollbar-thumb,
.ats-textarea::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.ats-resume-preview::-webkit-scrollbar-thumb:hover,
.ats-textarea::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Print Styles */
@media print {
    .header, .footer, .ats-hero, .ats-input-grid, .ats-action-bar,
    .ats-results-tabs, .ats-download-section, .ats-changes-legend { display: none !important; }
    .ats-resume-preview { max-height: none; border: none; background: #fff; color: #000; }
    body { background: #fff; }
}
