/* General Tool Styling */
body {
    background-color: #f8f9fa;
    font-family: 'Roboto', sans-serif;
}

.tool-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* NEW: Info Icon Style */
#info-icon {
    cursor: pointer;
    width: 28px;
    height: 28px;
    color: #adb5bd;
    transition: color 0.2s ease-in-out;
}

#info-icon:hover {
    color: #0d6efd;
}

.tool-header p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.tool-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 20px;
}

.input-column h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #343a40;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #adb5bd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: background-color 0.3s, border-color 0.3s;
    margin-bottom: 20px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.file-upload-area.dragover {
    background-color: #e9ecef;
    border-color: #0d6efd;
}

.file-upload-area svg {
    color: #0d6efd;
    margin-bottom: 15px;
}

.file-upload-area p {
    margin: 0;
    color: #495057;
    font-size: 1rem;
}

.file-upload-area .file-types {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
}

#file-name-display {
    font-weight: 500;
    color: #212529;
}

/* Text Areas */
textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Main Buttons */
.tool-footer {
    text-align: center;
    margin-top: 20px;
}

#enhance-cv-button {
    background: linear-gradient(90deg, #0d6efd, #6f42c1);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#enhance-cv-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#enhance-cv-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#try-another-role-button {
    background: transparent;
    color: #0d6efd;
    border: 2px solid #0d6efd;
    border-radius: 50px;
    padding: 13px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    margin-top: 20px;
}

#try-another-role-button:hover {
    background-color: #0d6efd;
    color: white;
    transform: translateY(-2px);
}


/* Loading and Results Sections */
#loading-indicator, #results-section, #cover-letter-section, #analysis-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    border-radius: 12px;
}

#loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

#loading-indicator.hidden, #results-section.hidden, #cover-letter-section.hidden, #analysis-section.hidden, #reset-section.hidden {
    display: none;
}

#loading-text {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 80%;
    max-width: 500px;
    background-color: #e9ecef;
    border-radius: 50px;
    height: 20px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #6f42c1);
    border-radius: 50px;
    transition: width 0.4s ease-out;
}

#job-tip {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: #000000;
    font-size: 1.1rem;
    margin-top: 25px;
    padding: 0 20px;
    min-height: 40px;
    font-style: italic;
}

#error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    transition: opacity 0.3s;
}

#error-message.hidden {
    display: none;
}

#results-section, #cover-letter-section {
    background-color: #e6f9f0;
    border: 1px solid #a3e6c3;
}

#results-section h2, #cover-letter-section h2 {
    color: #0f5132;
    margin-top: 15px;
    font-size: 1.5rem;
}
.download-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.download-buttons button {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-buttons button:hover {
    opacity: 0.9;
}

#analysis-section {
    background-color: #fefce8; 
    border: 1px solid #fde047;
    text-align: left;
}

#analysis-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: #854d0e;
    margin-bottom: 25px;
}

#suitability-score-container h3, 
#missing-skills-container h3, 
#interview-prep-container h3 {
    font-size: 1.3rem;
    color: #a16207;
    border-bottom: 2px solid #facc15;
    padding-bottom: 8px;
    margin-top: 20px;
    margin-bottom: 15px;
}

#suitability-score-container .score {
    font-size: 3rem;
    font-weight: 700;
    color: #4d7c0f;
    text-align: center;
}

#suitability-score-container p {
    text-align: center;
    font-size: 1rem;
    color: #1e293b; 
    margin-top: 10px;
}

#missing-skills-container p {
    font-size: 1rem;
    line-height: 1.6;
    color: #1e293b;
}

#interview-prep-container {
    color: #1e293b;
}

#interview-prep-container h3 {
    color: #a16207; 
}

#interview-prep-container ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

#interview-prep-container li {
    font-size: 1rem;
    margin-bottom: 10px;
}
#interview-prep-container strong {
    font-weight: 500;
}

/* NEW: Video Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background-color: #000;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    overflow: hidden;
}

.modal-close-button {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* UPDATED: Accordion Section */
.accordion-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0;
}

.accordion-wrapper {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden; /* Fixes the bottom border line issue */
}

.accordion-toggle {
    background: linear-gradient(to right, #ffffff, #f8f9fa);
    color: #212529;
    cursor: pointer;
    padding: 20px 30px;
    width: 100%;
    border: none;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
    outline: none;
    font-size: 1.3rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-toggle:hover {
    background-color: #f1f3f5;
}

.accordion-toggle.active {
   border-bottom-color: transparent;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-toggle.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-panel {
    padding: 0;
    background-color: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    border: none;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 30px;
}

.link-grid a {
    background-color: #ffffff;
    padding: 16px;
    border-radius: 10px;
    text-decoration: none;
    color: #0d6efd;
    font-weight: 500;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-grid a:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    color: #6f42c1;
}


/* Responsive Design */
@media (max-width: 992px) {
    .tool-container, .accordion-section {
        margin-left: 20px;
        margin-right: 20px;
        padding: 20px;
    }
    .tool-content {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}
