* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

header h1 {
    color: #333;
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.presets-section {
    margin-bottom: 40px;
}

.presets-section h3 {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.preset-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.preset-btn:hover {
    background: #333;
    color: white;
    border-color: #333;
    transform: translateY(-1px);
}

.prompt-form {
    margin-bottom: 30px;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    padding: 8px 8px 8px 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.chat-input-wrapper:focus-within {
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chat-input-wrapper textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    padding: 12px 0;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
    min-width: 0;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

.chat-input-wrapper textarea::-webkit-inner-spin-button,
.chat-input-wrapper textarea::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.chat-input-wrapper textarea::-webkit-resizer {
    display: none;
}

.chat-input-wrapper textarea::placeholder {
    color: #999;
}

.generate-btn-inline {
    padding: 12px 24px;
    background: #333;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.generate-btn-inline:hover:not(:disabled) {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.generate-btn-inline:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn-inline:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.result-container {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in;
}

.image-wrapper {
    text-align: center;
}

.image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.image-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    padding: 12px 30px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.action-btn:hover {
    background: #000;
    transform: translateY(-2px);
}

.action-btn:active {
    transform: translateY(0);
}

.error-container {
    margin-top: 20px;
    padding: 15px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    color: #c33;
    text-align: center;
}

.error-container p {
    margin: 0;
}

.examples-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.examples-section h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.example-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f9f9f9;
}

.example-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.example-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    header {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .presets-section {
        margin-bottom: 30px;
    }

    .presets-grid {
        gap: 8px;
    }

    .preset-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .chat-input-wrapper {
        padding: 6px 6px 6px 16px;
        border-radius: 20px;
        gap: 8px;
    }

    .chat-input-wrapper textarea {
        font-size: 16px;
        padding: 10px 0;
        min-height: 44px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .generate-btn-inline {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 90px;
        border-radius: 14px;
    }

    .image-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .examples-section {
        margin-top: 40px;
        padding-top: 30px;
    }

    .examples-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.site-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

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

.footer-content p {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.footer-content a {
    color: #333;
    text-decoration: none;
    margin: 0 10px;
}

.footer-content a:hover {
    text-decoration: underline;
}

.compliance-statement {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    text-align: left;
}

.compliance-statement h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.compliance-statement p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 12px;
}

.compliance-statement strong {
    color: #333;
}

