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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 12px 30px;
    border: none;
    background: #f0f0f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e0e0e0;
}

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

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.tab-content {
    display: none;
}

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

/* Form Sections */
.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

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

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="tel"],
.input-group input[type="url"],
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.input-group input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.input-group input[type="file"] {
    padding: 10px;
    background: #fff;
    border: 2px dashed #ccc;
    border-radius: 10px;
    width: 100%;
    cursor: pointer;
}

.input-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.color-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.type-input {
    display: none;
}

.type-input.active {
    display: block;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.btn-secondary {
    width: 100%;
    padding: 10px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-download {
    padding: 12px 25px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-download:hover {
    background: #218838;
}

/* Customization Panel */
.customization-panel {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    height: fit-content;
}

.customization-panel h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Preview Section */
.preview-section {
    margin-top: 40px;
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.preview-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.qr-preview {
    display: inline-block;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.qr-preview canvas {
    display: block;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Bulk Results */
.bulk-results {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.bulk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.bulk-header h3 {
    color: #333;
}

.bulk-header .btn-primary {
    width: auto;
}

.bulk-qr-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.bulk-qr-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.bulk-qr-item:hover {
    transform: translateY(-5px);
}

.bulk-qr-item canvas {
    display: block;
    margin: 0 auto 15px;
}

.bulk-qr-item .qr-label {
    font-size: 0.85rem;
    color: #666;
    word-break: break-all;
    margin-bottom: 10px;
    max-height: 40px;
    overflow: hidden;
}

.bulk-qr-item .btn-download {
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* File Upload */
.file-upload {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.file-upload label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .customization-panel {
        order: -1;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .color-inputs {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .bulk-header {
        flex-direction: column;
        gap: 15px;
    }
}

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

.preview-section,
.bulk-results {
    animation: fadeIn 0.5s ease;
}

.bulk-qr-item {
    animation: fadeIn 0.3s ease;
}

/* Logo Preview */
.logo-preview-container {
    margin-bottom: 20px;
}

.logo-preview-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.logo-preview-wrapper {
    width: 100%;
    height: 100px;
    background: 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-preview-wrapper img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

/* Logo Background Options */
.logo-bg-options {
    margin-top: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.logo-bg-options input[type="color"] {
    width: 50px;
    height: 35px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 10px;
}

.logo-bg-options label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
}

.logo-bg-options input[type="range"] {
    width: 100%;
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.checkbox-label span {
    font-size: 0.95rem;
    color: #333;
}
