* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: system-ui, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}
h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.panel {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
}
.panel h2 {
    font-size: 1rem;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.image-area {
    width: 100%;
    min-height: 300px;
    border: 2px dashed #444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    overflow: hidden;
    position: relative;
}
.image-area:hover, .image-area.dragover {
    border-color: #4a9eff;
}
.image-area img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}
.image-area .placeholder {
    color: #666;
    text-align: center;
    padding: 20px;
}
.prompt-area {
    margin-top: 15px;
}
textarea {
    width: 100%;
    height: 100px;
    background: #333;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    color: #e0e0e0;
    font-size: 14px;
    resize: vertical;
}
textarea:focus {
    outline: none;
    border-color: #4a9eff;
}
button {
    margin-top: 15px;
    padding: 12px 24px;
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #3a8eef;
}
button:disabled {
    background: #555;
    cursor: not-allowed;
}
.output-area {
    min-height: 300px;
    background: #222;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.output-area img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}
.output-area .placeholder {
    color: #555;
}
.overlay-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    background: rgba(74, 158, 255, 0.9);
    font-size: 12px;
    margin-top: 0;
}
.clear-btn {
    background: rgba(255, 107, 107, 0.9);
}
.clear-btn:hover {
    background: rgba(255, 80, 80, 0.9);
}
.compare-panel {
    margin-top: 20px;
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
}
.compare-panel h2 {
    font-size: 1rem;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.compare-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.compare-controls button {
    margin-top: 0;
    padding: 8px 16px;
    font-size: 13px;
}
.compare-controls button.active {
    background: #3a8eef;
    box-shadow: 0 0 0 2px #4a9eff;
}
.compare-area {
    min-height: 300px;
    background: #222;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.compare-area img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}
.compare-area .placeholder {
    color: #555;
}
.compare-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #aaa;
}
.compare-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
}
.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
}
.status.error {
    background: #3a1a1a;
    color: #ff6b6b;
}
.status.success {
    background: #1a3a1a;
    color: #6bff6b;
}
.status.loading {
    background: #1a2a3a;
    color: #6bb3ff;
}
.text-response {
    margin-top: 15px;
    padding: 15px;
    background: #222;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.settings-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}
.setting-group {
    flex: 1;
}
.setting-group label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.setting-group select {
    width: 100%;
    padding: 8px 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
}
.setting-group select:focus {
    outline: none;
    border-color: #4a9eff;
}

/* API Key Bar */
.api-key-bar {
    max-width: 1200px;
    margin: 0 auto 20px;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 12px 16px;
}
.api-key-status {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #888;
}
.api-key-status:hover {
    color: #aaa;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b6b;
}
.status-dot.active {
    background: #6bff6b;
}
.api-key-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.api-key-input-wrapper input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
}
.api-key-input-wrapper input:focus {
    outline: none;
    border-color: #4a9eff;
}
.api-key-input-wrapper button {
    margin-top: 0;
    padding: 8px 16px;
    font-size: 13px;
}
.api-key-input-wrapper button.secondary {
    background: #444;
}
.api-key-input-wrapper button.secondary:hover {
    background: #555;
}
.api-link {
    color: #4a9eff;
    font-size: 12px;
    text-decoration: none;
}
.api-link:hover {
    text-decoration: underline;
}
