/* ===============================================================
   GLOBAL & LAYOUT STYLES
=============================================================== */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 960px; /* Wider container for a landing page feel */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}


/* ===============================================================
   NEW LANDING PAGE SECTIONS
=============================================================== */

/* --- Hero Section --- */
.hero-section {
    background-color: #34495e;
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}
.hero-section h1 {
    color: #ffffff;
    font-size: 3em;
    margin-bottom: 0.25em;
}
.hero-section h2 {
    color: #ecf0f1;
    font-size: 1.5em;
    font-weight: 400; /* Use Poppins for heading but normal weight */
    max-width: 700px;
    margin: 0 auto 1.5em auto;
}
.btn-primary {
    background-color: #3498db;
    color: white;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}
.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}
.hero-section .small-text {
    margin-top: 15px;
    color: #bdc3c7;
    font-size: 0.9em;
}

/* --- General Content Sections --- */
.content-section {
    padding: 60px 0;
    text-align: center;
}
.content-section-colored {
    background-color: #ffffff;
    padding: 60px 0;
    text-align: center;
}
.content-section h2, .content-section-colored h2 {
    font-size: 2.2em;
    margin-bottom: 50px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: left;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    text-align: left;
}
.grid-item h3 {
    margin-top: 0;
    font-size: 1.4em;
}

/* --- FAQ Section --- */
.faq-container {
    max-width: 750px;
    margin: 0 auto;
    text-align: left;
}
.faq-item {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.faq-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* --- Footer --- */
footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
}

/* ===============================================================
   YOUR ORIGINAL APP STYLES (WRAPPED & ADJUSTED)
=============================================================== */

.app-wrapper {
    background-color: #ffffff;
    padding: 40px;
    margin: 40px auto; /* Gives space above and below the app */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 680px; /* Slightly wider for better form layout */
    text-align: center;
    scroll-margin-top: 20px; /* Ensures space when jumping to #app-wrapper anchor */
}

header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.messages { margin-bottom: 20px; }
.alert { padding: 15px; margin-bottom: 15px; border-radius: 6px; font-size: 0.95em; text-align: left; }
.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.upload-form .form-group { margin-bottom: 25px; text-align: left; }
.upload-form label { display: block; margin-bottom: 8px; font-weight: 400; color: #333; }
.upload-form input[type="file"],
.upload-form input[type="text"],
.upload-form input[type="number"]{ width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; font-size: 1em; }
.upload-form input[type="file"] { padding: 10px; background-color: #f9f9f9; }
.upload-form small { display: block; margin-top: 5px; font-size: 0.85em; color: #777; }

.btn-submit {
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: inline-block;
    width: auto;
}
.btn-submit:hover { background-color: #2980b9; }
.btn-submit:active { transform: translateY(1px); }

#loading-indicator { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; margin-top: 30px; }
.spinner { border: 6px solid #f3f3f3; border-top: 6px solid #3498db; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#loading-indicator p { font-size: 1.1em; color: #555; }

.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 15px; margin-top: 20px; margin-bottom: 20px; padding: 10px; border: 1px solid #eee; border-radius: 8px; background-color: #f9f9f9; max-height: 400px; overflow-y: auto; }
.char-item { display: flex; flex-direction: column; align-items: center; padding: 10px; border: 1px solid #ddd; border-radius: 6px; background-color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.char-item img { max-width: 80px; max-height: 80px; object-fit: contain; margin-bottom: 10px; border: 1px solid #eee; }
.char-label-input { width: 50px; text-align: center; padding: 5px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 8px; font-size: 1em; }
.char-remove-btn { background-color: #e74c3c; color: white; border: none; padding: 5px 10px; font-size: 0.8em; border-radius: 4px; cursor: pointer; transition: background-color 0.2s ease; }
.char-remove-btn:hover { background-color: #c0392b; }

#previewArea { margin-top: 30px; text-align: left; }
#fontPreviewEditor { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; font-size: 1.2em; min-height: 150px; }
#downloadFontBtn { margin-top: 15px; background-color: #2ecc71; }
#downloadFontBtn:hover { background-color: #27ae60; }

#uploadedImagePreviewContainer { margin-top: 15px; margin-bottom: 15px; text-align: center; }
#uploadedImagePreviewContainer label { display: block; margin-bottom: 10px; font-weight: bold; color: #333; }
#uploadedImagePreview { max-width: 80%; max-height: 300px; border: 2px solid #ddd; border-radius: 6px; object-fit: contain; }

.sample-images-section { margin-bottom: 30px; padding: 20px; background-color: #f9f9f9; border-radius: 8px; border: 1px solid #eee; }
.sample-images-section h3 { text-align: center; margin-top: 0; margin-bottom: 15px; color: #333; }
.sample-image-container { display: flex; justify-content: space-around; align-items: flex-start; gap: 20px; }
.sample-image-item { flex-basis: 45%; text-align: center; }
.sample-image-item img { max-width: 100%; height: auto; max-height: 150px; border: 1px solid #ddd; border-radius: 6px; object-fit: contain; }
.sample-image-item .caption { font-size: 0.9em; color: #555; margin-top: 5px; margin-bottom: 0px; }
.sample-image-item .caption.good { color: #27ae60; }
.sample-image-item .caption.bad { color: #c0392b; }

/* ===============================================================
   RESPONSIVE ADJUSTMENTS
=============================================================== */

@media (max-width: 768px) {
    .hero-section h1 { font-size: 2.2em; }
    .hero-section h2 { font-size: 1.2em; }

    .grid-3, .grid-2 {
        grid-template-columns: 1fr; /* Stack grids on mobile */
    }

    .app-wrapper {
        padding: 20px;
        margin: 20px 10px;
    }
}