/* ========== Global 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-color: #f8f9fa;
}

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

/* ========== Navigation ========== */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: #fff;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-small {
    padding: 5px 15px;
    font-size: 0.9rem;
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Features Section ========== */
.features {
    padding: 60px 20px;
    background-color: white;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

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

.feature-card {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

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

.feature-card h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* ========== Authentication ========== */
.auth-container {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.auth-box {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.auth-box form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.auth-box form input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.auth-box form button {
    width: 100%;
}

.auth-box p {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-box a {
    color: #3498db;
    text-decoration: none;
}

.auth-box a:hover {
    text-decoration: underline;
}

/* ========== Forms ========== */
.resume-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.form-section input,
.form-section textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-section input:focus,
.form-section textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

/* ========== Dashboard ========== */
.resumes-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 2rem;
    border-radius: 5px;
    overflow: hidden;
}

.resumes-table thead {
    background-color: #2c3e50;
    color: white;
}

.resumes-table th {
    padding: 1rem;
    text-align: left;
}

.resumes-table td {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
}

.resumes-table tbody tr:hover {
    background-color: #f0f0f0;
}

/* ========== Preview Page ========== */
.preview-page {
    padding: 2rem 0;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.preview-header h2 {
    color: #2c3e50;
}

.ats-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    text-align: center;
}

.ats-score h3 {
    margin-bottom: 0.5rem;
}

.score {
    font-size: 2rem;
    font-weight: bold;
}

.preview-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 5px;
}

.resume-preview {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 0.95rem;
    font-family: 'Segoe UI', 'Liberation Sans', Arial, sans-serif;
    color: #222;
}

.resume-preview #resumeContent {
    line-height: 1.7;
}

/* Resume section styling */
.resume-preview h1 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.resume-preview h2.resume-section {
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 12px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resume-preview .contact-line {
    text-align: center;
    font-size: 0.9rem;
    margin: 2px 0;
    color: #444;
}

.resume-preview .resume-job-title {
    font-weight: 600;
    margin: 8px 0 3px 0;
    color: #1a1a1a;
}

.resume-preview .resume-education {
    font-weight: 600;
    margin: 6px 0 2px 0;
    color: #1a1a1a;
}

.resume-preview .resume-subheading {
    margin: 4px 0;
    font-size: 0.95rem;
}

.resume-preview .resume-list {
    margin: 6px 0 6px 20px;
    padding: 0;
    list-style-type: disc;
}

.resume-preview .resume-list li {
    margin: 3px 0;
    padding: 0;
}

/* ========== Chat Section ========== */
.chat-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.chat-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.chat-section textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.chat-section textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

#chatResponse {
    background-color: #ecf0f1;
    border-left: 4px solid #3498db;
}

#chatResponse h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* ========== Footer ========== */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons a {
        width: 100%;
        text-align: center;
    }

    .nav-links {
        gap: 1rem;
    }

    .preview-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .preview-controls {
        flex-direction: column;
    }

    .preview-controls a {
        width: 100%;
        text-align: center;
    }
}

/* ========== Loading State ========== */
#loading {
    color: #3498db;
    font-weight: bold;
}

#chatLoading {
    color: #3498db;
    font-weight: bold;
}
