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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.content-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 1200px;
}

h1 {
    text-align: center;
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-weight: 700;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.section {
    margin-bottom: 30px;
    background: #f8f9ff;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e0e7ff;
}

.section-number {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-size: 1.2em;
    margin-right: 10px;
    font-weight: 700;
}

h3 {
    display: inline-block;
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: 2px solid #e0e7ff;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.tab-btn svg {
    width: 20px;
    height: 20px;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

label {
    display: block;
    margin: 15px 0 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e7ff;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

/* Design Tabs */
.design-tabs {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    background: #e0e7ff;
    padding: 5px;
    border-radius: 10px;
}

.design-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.design-tab-btn.active {
    background: white;
    color: #667eea;
}

.design-tab-content {
    display: none;
}

.design-tab-content.active {
    display: block;
}

h4 {
    margin: 20px 0 15px;
    color: #555;
    font-size: 1.1em;
}

/* Shape Options */
.shape-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.border-options,
.center-options {
    display: flex;
    gap: 8px;
    margin: 15px 0;
}

.shape-btn {
    aspect-ratio: 1;
    padding: 10px;
    border: 2px solid #e0e7ff;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.border-btn,
.center-btn {
    width: 50px;
    height: 50px;
    padding: 6px;
    border: 2px solid #e0e7ff;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shape-btn:hover,
.border-btn:hover,
.center-btn:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.shape-btn.active,
.border-btn.active,
.center-btn.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.shape-btn svg,
.border-btn svg,
.center-btn svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Color Section */
.color-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.color-input-group {
    margin-bottom: 15px;
}

.color-input-group label {
    margin-bottom: 8px;
    font-size: 0.9em;
}

.color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid #e0e7ff;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
}

.color-picker input[type="text"] {
    flex: 1;
    text-transform: uppercase;
}

.invert-btn {
    width: 100%;
    padding: 10px;
    background: white;
    border: 2px solid #e0e7ff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.invert-btn:hover {
    background: #f0f4ff;
    border-color: #667eea;
}

/* Right Panel */
.right-panel {
    position: sticky;
    top: 20px;
}

.qr-preview {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    border: 2px solid #e0e7ff;
}

#qr-canvas {
    max-width: 100%;
    height: auto;
}

#qr-canvas canvas {
    max-width: 100%;
    height: auto !important;
    width: 100% !important;
}

.placeholder-text {
    text-align: center;
    color: #999;
}

.placeholder-text svg {
    opacity: 0.3;
    margin-bottom: 15px;
    stroke: #667eea;
}

.placeholder-text p {
    font-size: 0.95em;
    margin-top: 10px;
}

#qr-canvas {
    max-width: 100%;
    height: auto;
}

.generate-btn,
.download-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.generate-btn:hover,
.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.generate-btn:active,
.download-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.format-options {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.format-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e7ff;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.format-btn:hover {
    border-color: #667eea;
}

.format-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.info-text {
    color: #888;
    font-size: 0.95em;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .right-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .content-box {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: white;
    font-size: 0.95em;
}

.footer p {
    margin: 0;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.footer a:hover {
    border-bottom-color: white;
}

/* Size Slider */
.size-section {
    margin: 20px 0;
}

.size-section h4 {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 1.1em;
}

.size-slider-container {
    margin: 10px 0;
}

#qr-size {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #e0e7ff 0%, #667eea 50%, #764ba2 100%);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

#qr-size::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#qr-size::-webkit-slider-thumb:hover {
    background: #764ba2;
    transform: scale(1.1);
}

#qr-size::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#qr-size::-moz-range-thumb:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.size-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #666;
}

.size-display span:first-child,
.size-display span:last-child {
    color: #999;
    font-size: 0.8em;
}

#size-value {
    font-weight: 700;
    color: #667eea;
    font-size: 1em;
}

input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Logo Upload */
.logo-upload-section {
    margin: 15px 0;
}

.upload-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.logo-preview {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border: 2px solid #e0e7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-preview img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e0e7ff;
    padding: 5px;
}

.remove-logo-btn {
    padding: 8px 12px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    margin-left: auto;
}

.remove-logo-btn:hover {
    background: #cc0000;
}

.logo-settings {
    margin-top: 20px;
}

.logo-settings label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 600;
    color: #555;
}

.logo-settings input[type="range"] {
    width: calc(100% - 60px);
    margin-right: 10px;
}

.logo-settings span {
    display: inline-block;
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: #667eea;
}
