* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3748;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.controls .form-group {
    margin-bottom: 16px;
}

.controls label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.controls textarea,
.controls input[type="number"],
.controls select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.controls textarea:focus,
.controls input:focus,
.controls select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.controls textarea {
    resize: vertical;
    font-family: inherit;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input input[type="color"] {
    width: 50px;
    height: 36px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
}

.color-input span {
    font-family: monospace;
    color: #4a5568;
    font-size: 0.9rem;
}

.logo-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-btn {
    background: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.logo-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.logo-remove-btn {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.logo-remove-btn:hover {
    background: #fc8181;
    color: #fff;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #edf2f7;
    color: #4a5568;
}

.btn:hover:not(:disabled) {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#generateBtn {
    margin-top: 8px;
}

.presets {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.presets h3 {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 12px;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-btn {
    padding: 6px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    background: #fff;
    color: #4a5568;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.preview {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-wrapper {
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode img,
#qrcode canvas {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.placeholder-hint {
    color: #a0aec0;
    font-size: 0.9rem;
    text-align: center;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

.info {
    text-align: center;
    color: #718096;
    font-size: 0.85rem;
}

.info p {
    margin: 4px 0;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}