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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

header p {
    color: #6c757d;
    font-size: 1rem;
}

.qr-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    background: white;
    margin: 20px auto;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.option {
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border-radius: 6px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.option:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.option.selected {
    background: #e7f3ff;
    border-color: #007bff;
}

.option svg {
    display: block;
    margin: 0 auto 8px;
    stroke: #555;
}

.option.selected svg {
    stroke: #007bff;
}

.option .label {
    font-weight: 600;
    font-size: 12px;
    color: #555;
}

.option.selected .label {
    color: #007bff;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.settings {
    padding: 30px;
    border-right: 1px solid #e9ecef;
}

.settings h2 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    flex: 1;
}

.range-value {
    min-width: 40px;
    font-weight: 600;
    color: #007bff;
}

button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background: #0056b3;
}

button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.frame-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.frame-option {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.frame-option:hover {
    border-color: #007bff;
}

.frame-option.selected {
    border-color: #007bff;
    background: #e7f3ff;
    color: #007bff;
}

.position-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.position-option {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.position-option:hover {
    border-color: #007bff;
}

.position-option.selected {
    border-color: #007bff;
    background: #e7f3ff;
    color: #007bff;
}

.preview {
    padding: 30px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview h2 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #2c3e50;
    align-self: flex-start;
}

.qr-container {
    margin-bottom: 20px;
}

#qrCode {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.text-preview {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    word-wrap: break-word;
}

footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

footer p {
    margin: 5px 0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .settings {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .frame-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .text-preview {
        width: 100%;
        max-width: 280px;
    }
}