:root {
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --primary-color: #007bff;
    --primary-variant-color: #0056b3;
    --on-surface-color: #212529;
    --on-surface-light-color: #6c757d;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--on-surface-color);
    font-family: var(--font-family);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.site-header {
    padding: 20px 0;
    background-color: var(--surface-color);
    border-bottom: 1px solid #dee2e6;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo svg {
    height: 35px;
}

/* --- Section Heading --- */
.section-heading {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--on-surface-color);
}
.section-heading span {
    color: var(--primary-color);
}
.section-subheading {
    text-align: center;
    font-size: 1.1rem;
    color: var(--on-surface-light-color);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* --- Tool Section (General) --- */
.tool-section {
    padding: 60px 0 80px;
    text-align: center;
}

/* --- Dropzone --- */
#dropzone-container {
    max-width: 800px;
    margin: 0 auto;
}

.dropzone {
    border: 2px dashed #ced4da;
    border-radius: 12px;
    background-color: var(--surface-color);
    min-height: 300px;
    padding: 30px;
    transition: border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone.dz-drag-hover {
    border-color: var(--primary-color);
}

.dropzone .dz-message {
    margin: 0;
    color: var(--on-surface-light-color);
    font-weight: 400;
}

.dz-message-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dropzone-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.dropzone-instructions {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--on-surface-color);
    margin-bottom: 10px;
}

.dropzone-or-divider {
    margin-bottom: 10px;
    font-size: 1rem;
}

.dz-button {
    background: var(--primary-color);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    border: none;
    transition: background-color 0.3s, transform 0.2s;
}

.dz-button:hover {
    background: var(--primary-variant-color);
    transform: scale(1.05);
}

.dz-message-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #888;
}

.dropzone .dz-preview {
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin: 10px;
}

.dropzone .dz-preview .dz-image {
    border-radius: 7px 7px 0 0;
}

.dropzone .dz-preview .dz-details {
    color: var(--on-surface-color);
    background: var(--surface-color);
    padding: 10px;
}

.dropzone .dz-preview .dz-remove {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}
.dropzone .dz-preview .dz-remove:hover {
    text-decoration: underline;
}

/* --- Other Tools Section --- */
.other-tools-section {
    padding: 80px 0;
    background-color: var(--surface-color);
    border-top: 1px solid #dee2e6;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.tool-card {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--on-surface-color);
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.tool-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.tool-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--on-surface-light-color);
}

/* --- Content & FAQ Section --- */
.content-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.content-wrapper h2, .content-wrapper h3, .content-wrapper h4 {
    font-weight: 600;
    margin-bottom: 20px;
}

.content-wrapper h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.content-wrapper h3 {
    font-size: 1.6rem;
    margin-top: 40px;
}

.content-wrapper p, .content-wrapper li {
    color: var(--on-surface-light-color);
    line-height: 1.8;
    margin-bottom: 15px;
}

.content-wrapper ul, .content-wrapper ol {
    padding-left: 25px;
}

/* --- Accordion FAQ Styles --- */
.faq-accordion {
    margin-top: 40px;
    border-top: 1px solid #dee2e6;
}

.faq-item {
    border-bottom: 1px solid #dee2e6;
}

.faq-question {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 20px 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--on-surface-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 10px;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--surface-color);
    color: var(--on-surface-light-color);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.main-footer p {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--on-surface-light-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}
.social-links {
    margin-top: 20px;
}
.social-links a {
    color: var(--on-surface-light-color);
    font-size: 1.5rem;
    margin: 0 12px;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}
.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .section-heading {
        font-size: 2.2rem;
    }
}

/* --- HTML to Image Form --- */
#html-form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
}
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-color);
    border: 1px solid #ced4da;
    border-radius: 8px;
    color: var(--on-surface-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}
.or-divider-text {
    text-align: center;
    margin: 30px 0;
    font-weight: 600;
    color: var(--on-surface-light-color);
    position: relative;
}
.or-divider-text::before, .or-divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #ced4da;
}
.or-divider-text::before { left: 0; }
.or-divider-text::after { right: 0; }

.submit-button {
    background: var(--primary-color);
    color: #ffffff;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    width: 100%;
    border: none;
    font-size: 1.1rem;
    transition: background-color 0.3s, transform 0.2s;
    font-family: var(--font-family);
}
.submit-button:hover {
    background: var(--primary-variant-color);
    transform: scale(1.02);
}

/* --- How It Works Section --- */
.how-it-works-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
    text-align: center;
}

.step-card {
    padding: 20px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.step-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--on-surface-light-color);
}

/* --- Features Section (Why Choose Us) --- */
.features-section {
    padding: 80px 0;
    background-color: var(--surface-color);
    border-top: 1px solid #dee2e6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background-color: var(--bg-color);
    padding: 35px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--on-surface-light-color);
}

/* --- Loader/Spinner --- */
.loader-container {
    text-align: center;
}
.loader {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid var(--primary-color); /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    margin: 40px auto 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Error 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.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #dee2e6;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    position: relative;
}

.modal-content h3 {
    color: #dc3545;
    margin-top: 0;
    margin-bottom: 15px;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}