/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Layout */
.page-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.sidebar {
    width: 300px;
    margin-left: 20px;
}

/* Headings */
h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.main-content h2 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    text-align: left;
    position: relative;
}

.main-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #e74c3c;
}

/* Form elements */
form {
    display: flex;
    flex-direction: column;
}

label {
    margin-top: 10px;
    font-weight: bold;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    height: 100px;
    resize: vertical;
}

button {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 10px 15px;
    margin-top: 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.0rem;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

/* Result area */
#results-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

/* Button group */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.download-button, .review-button {
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.download-button {
    background-color: #4CAF50;
}

.review-button {
    background-color: #008CBA;
}

/* CV Review Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#cvReviewContent {
    width: 100%;
    height: 300px;
    margin-top: 20px;
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

/* Ad spaces */
.ad-space {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.ad-space p {
    color: #888;
    font-style: italic;
}

/* Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Slogan */
.slogan {
    font-size: 1.0rem;
    color: #3a86ff;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-align: center;
    max-width: 900px;
    margin: 1rem auto;
    padding: 0 1rem;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: #f4f4f4;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

footer p {
    margin-top: 5px;
    font-size: 0.8em;
}

footer nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.footer-button {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 6px 12px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
}

.footer-button:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
    .page-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
    }

    .slogan {
        font-size: 0.9rem;
    }

    .button-group {
        flex-direction: column;
    }

    .download-button, .review-button {
        width: 100%;
        margin-bottom: 10px;
    }

    footer nav {
        flex-direction: column;
        align-items: center;
    }

    .footer-button {
        margin-bottom: 10px;
    }
}

@media (min-width: 769px) {
    .page-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main-content {
        flex: 1;
        margin-right: 20px;
        margin-bottom: 0;
    }

    footer {
        width: 100%;
    }
}
