/* ATS Score Generator Styles */
.ats-score-generator-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ats-upload-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.ats-upload-section h2 {
    color: #333;
    font-size: 26px;
    margin-bottom: 15px;
}

.ats-login-notice {
    background-color: #fff3cd; /* Light yellow background */
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    color: #856404; /* Dark yellow text */
}
.ats-login-notice a {
    color: #0056b3; /* Standard link color */
    font-weight: bold;
}


.file-upload-wrapper {
    border: 2px dashed #3a7bd5;
    border-radius: 8px;
    padding: 35px 20px;
    margin: 25px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover {
    border-color: #2b5aa7;
    background-color: rgba(58, 123, 213, 0.05);
}

.upload-icon {
    margin-bottom: 15px;
}

.upload-icon svg {
    width: 48px;
    height: 48px;
    stroke: #3a7bd5;
}

.upload-text {
    display: block;
    color: #555;
    font-size: 16px;
    margin-bottom: 5px;
}

.file-name {
    display: block;
    color: #3a7bd5;
    font-weight: bold;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
}

.ats-button {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
    text-decoration: none; /* Ensure no underline on button links */
    display: inline-block; /* Allow padding/margin on button links */
    line-height: normal; /* Fix vertical alignment */
}

.ats-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
    color: white; /* Keep text white on hover */
}
.ats-button:focus {
     outline: none;
     box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.5);
}
.ats-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


.ats-button.secondary {
    background: white;
    color: #3a7bd5;
    border: 2px solid #3a7bd5;
    box-shadow: none;
}

.ats-button.secondary:hover {
    background: rgba(58, 123, 213, 0.1);
    color: #3a7bd5;
}

.ats-loader {
    margin: 30px 0;
    text-align: center;
}

.spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(58, 123, 213, 0.3);
    border-radius: 50%;
    border-top-color: #3a7bd5;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ats-results-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.ats-score-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.ats-score-circle {
    text-align: center;
    width: 180px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    width: 150px;
    height: 150px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    animation: progress 1.5s ease-out forwards;
    stroke: #3a7bd5; /* Default color */
    transition: stroke-dasharray 1s ease, stroke 0.5s ease; /* Animate color change */
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

.percentage {
    fill: #333;
    font-size: 0.5em;
    text-anchor: middle;
    font-weight: bold;
}

.ats-score-circle h3 {
    font-size: 18px;
    margin-top: 10px;
    color: #555;
}

.ats-summary {
    flex: 1;
    padding-left: 40px;
}

.ats-summary h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.ats-summary p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.ats-metrics-container h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.ats-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Adjusted for smaller screens */
    grid-gap: 20px;
}

.metric-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    flex-grow: 1; /* Allow name to take space */
    margin-right: 10px; /* Space between name and score */
}

.metric-score {
    font-weight: bold;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0; /* Prevent shrinking */
}

.metric-bar {
    height: 8px;
    width: 100%;
    background: #eee;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease;
}

.metric-improvements {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
.metric-improvements strong {
    display: block; /* Put heading on its own line */
    margin-bottom: 5px;
    color: #333;
}
.metric-improvements div ul,
.metric-improvements div ol {
    margin-left: 20px; /* Indent lists */
    padding-left: 0;
    margin-top: 5px;
}
.metric-improvements div li {
    margin-bottom: 5px;
}


/* Score color categories */
.score-excellent {
    background-color: #4CAF50;
}
.score-good {
    background-color: #8BC34A;
}
.score-average {
    background-color: #FFC107;
}
.score-poor {
    background-color: #FF9800;
}
.score-critical {
    background-color: #F44336;
}

/* Also color the circle based on final score */
/* These styles are applied dynamically by JS */
.ats-score-circle .circle.score-excellent { stroke: #4CAF50; }
.ats-score-circle .circle.score-good { stroke: #8BC34A; }
.ats-score-circle .circle.score-average { stroke: #FFC107; }
.ats-score-circle .circle.score-poor { stroke: #FF9800; }
.ats-score-circle .circle.score-critical { stroke: #F44336; }


#analyze-new {
    display: block;
    margin: 30px auto 0;
}

.ats-cost-notice {
    background-color: #e7f3ff; /* Light blue */
    border: 1px solid #cce5ff;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    color: #004085; /* Dark blue */
    font-size: 0.95em;
}
.ats-cost-notice p {
    margin: 0;
}


/* Enhanced loader styles */
.ats-loader {
    position: relative;
    margin: 40px auto;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ats-loader p {
    margin-top: 20px;
    color: #3a7bd5;
    font-size: 18px;
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

/* Fancy loader animation */
.loader-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-animation div {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    animation: loader-animation 1.2s linear infinite;
}

.loader-animation div:nth-child(1) {
    top: 8px;
    left: 8px;
    animation-delay: 0s;
}

.loader-animation div:nth-child(2) {
    top: 8px;
    left: 32px;
    animation-delay: -0.4s;
}

.loader-animation div:nth-child(3) {
    top: 8px;
    left: 56px;
    animation-delay: -0.8s;
}

.loader-animation div:nth-child(4) {
    top: 32px;
    left: 8px;
    animation-delay: -0.4s;
}

.loader-animation div:nth-child(5) {
    top: 32px;
    left: 32px;
    animation-delay: -0.8s;
}

.loader-animation div:nth-child(6) {
    top: 32px;
    left: 56px;
    animation-delay: -1.2s;
}

.loader-animation div:nth-child(7) {
    top: 56px;
    left: 8px;
    animation-delay: -0.8s;
}

.loader-animation div:nth-child(8) {
    top: 56px;
    left: 32px;
    animation-delay: -1.2s;
}

.loader-animation div:nth-child(9) {
    top: 56px;
    left: 56px;
    animation-delay: -1.6s;
}

@keyframes loader-animation {
    0%, 100% {
        opacity: 1;
        transform: scale(1.2);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Loading progress bar */
.loading-progress {
    width: 200px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3a7bd5, #00d2ff);
    border-radius: 3px;
    position: absolute;
    transition: width 0.5s ease;
    animation: progress-animation 2s infinite;
}

@keyframes progress-animation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ats-score-overview {
        flex-direction: column;
    }

    .ats-summary {
        padding-left: 0;
        margin-top: 30px;
        text-align: center;
    }

    .ats-metrics {
        grid-template-columns: 1fr;
    }
}