/* Modern base styles */
:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --error-color: #dc3545;
    --text-color: #2c3e50;
    --border-color: #e1e4e8;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    background-color: #f8f9fa;
}

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

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.company-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.instructions {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.instructions .intro {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

.steps-container {
    margin-bottom: 2rem;
}

.instructions h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

.instructions h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-align: center;
}

.instructions .steps-list {
    display: block;
    margin: 0;
    padding-left: 0;
    list-style-type: none;
    counter-reset: step-counter;
}
.instructions .steps-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2.2rem;
    min-height: 2.2rem;
    display: flex;
    align-items: center;
    counter-increment: step-counter;
}
.instructions .steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.7rem;
    height: 1.7rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
}
.instructions .steps-list li strong {
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 0.3em;
}

.features {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0;
    padding: 0;
}
@media (min-width: 700px) {
    .features-list {
        grid-template-columns: repeat(4, 1fr);
    }
}
.features-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 60px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    padding: 1rem 0.5rem;
    text-align: center;
}
.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}
.feature-text {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.3;
    display: block;
    min-height: 2.2em;
}

.instructions .note {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: 0.9rem;
    color: #666;
}

/* Form styles */
.form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    position: relative;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: block;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Color picker styles */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    position: relative;
}

.btn:hover {
    background-color: #0056b3;
}

.download-btn {
    background-color: var(--success-color);
    text-decoration: none;
}

.download-btn:hover {
    background-color: #218838;
}

/* Loading spinner */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    margin-left: 8px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading .loader {
    display: block;
}

.loading .btn-text {
    opacity: 0.7;
}

/* Image grid styles */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.image-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 3/2;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-item label {
    cursor: pointer;
    display: block;
    margin: 0;
}

.image-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.checkbox-overlay svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.image-item input[type="checkbox"]:checked + .checkbox-overlay {
    opacity: 1;
}

.image-item:hover img {
    transform: scale(1.05);
}

/* Result styles */
.result {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.result img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.result .download-btn {
    margin-top: 1rem;
}

.error {
    color: var(--error-color);
    background: #fff;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    border-left: 4px solid var(--error-color);
}

.short-desc {
    text-align: center;
    font-size: 1.15rem;
    color: #4a5568;
    margin-bottom: 2rem;
}

.main-action-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 2rem 2rem 1.5rem 2rem;
    margin: 0 auto 1.5rem auto;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-action-card .form {
    background: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0.5rem;
    width: 100%;
    text-align: center;
}

.toggle-instructions-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3em;
    transition: color 0.2s;
}
.toggle-instructions-btn:hover {
    color: #0056b3;
}

.instructions.collapsible {
    margin: 0 auto 2rem auto;
    max-width: 700px;
    transition: all 0.3s;
    border: 1px solid #e1e4e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
} 