        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        :root {
            --primary: #2563eb;
            --primary-light: #3b82f6;
            --success: #10b981;
            --danger: #ef4444;
            --warning: #f59e0b;
            --gray-50: #f9fafb;
            --gray-100: #f3f4f6;
            --gray-200: #e5e7eb;
            --gray-300: #d1d5db;
            --gray-600: #4b5563;
            --gray-900: #111827;
        }

        body {
            background: var(--gray-50);
            min-height: 100vh;
            padding: 15px;
            color: var(--gray-900);
        }

        .container {
            max-width: 900px;
            margin: 20px auto;
        }

        header {
            background: white;
            padding: 30px 24px;
            border-radius: 16px;
            text-align: center;
            margin-bottom: 20px;
            border: 1px solid var(--gray-200);
        }

        h1 {
            font-size: 24px;
            margin-bottom: 6px;
            color: var(--gray-900);
            font-weight: 700;
            line-height: 1.3;
        }

        .subtitle {
            color: var(--gray-600);
            font-size: 14px;
        }

        .tab-buttons {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 20px;
            background: white;
            padding: 6px;
            border-radius: 12px;
            border: 1px solid var(--gray-200);
        }

        .tab-btn {
            background: transparent;
            padding: 12px 8px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 600;
            color: var(--gray-600);
            font-size: 13px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            touch-action: manipulation;
        }

        .tab-btn:hover {
            background: var(--gray-100);
            color: var(--gray-900);
        }

        .tab-btn.active {
            background: var(--primary);
            color: white;
        }

        .form-section {
            background: white;
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--gray-200);
            display: none;
        }

        .form-section.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: var(--gray-900);
            font-weight: 600;
            font-size: 13px;
        }

        input, select, textarea {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--gray-300);
            border-radius: 8px;
            font-size: 14px;
            background: white;
            color: var(--gray-900);
            transition: all 0.2s;
            font-family: inherit;
        }

        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        input::placeholder, textarea::placeholder {
            color: var(--gray-600);
        }

        textarea {
            resize: vertical;
            min-height: 100px;
        }

        button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 12px 18px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            touch-action: manipulation;
        }

        button:hover {
            background: var(--primary-light);
        }

        button:active {
            transform: scale(0.98);
        }

        .qr-settings {
            background: var(--gray-50);
            padding: 16px;
            border-radius: 8px;
            margin-bottom: 20px;
            border: 1px solid var(--gray-200);
        }

        .settings-title {
            font-weight: 700;
            margin-bottom: 12px;
            color: var(--gray-900);
            font-size: 14px;
        }

        .settings-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .color-input-wrapper {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        input[type="color"] {
            width: 50px;
            height: 44px;
            padding: 4px;
            cursor: pointer;
        }

        .logo-upload {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        input[type="file"] {
            flex: 1;
            font-size: 12px;
            padding: 8px;
        }

        #qrcode {
            display: flex;
            justify-content: center;
            margin-top: 30px;
            padding: 20px;
            background: var(--gray-50);
            border-radius: 12px;
            border: 1px solid var(--gray-200);
            position: relative;
        }

        #qrcode canvas, #qrcode img {
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .qr-actions {
            display: none;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-top: 15px;
        }

        .qr-actions.active {
            display: grid;
        }

        .download-btn {
            background: var(--success);
        }

        .download-btn:hover {
            background: #059669;
        }

        .print-btn {
            background: var(--warning);
        }

        .print-btn:hover {
            background: #d97706;
        }

        .share-btn {
            background: #8b5cf6;
        }

        .share-btn:hover {
            background: #7c3aed;
        }

        .scan-btn {
            background: var(--danger);
        }

        .scan-btn:hover {
            background: #dc2626;
        }

        .history-section {
            background: white;
            padding: 20px;
            border-radius: 12px;
            border: 1px solid var(--gray-200);
            margin-top: 20px;
        }

        .history-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid var(--gray-200);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .clear-history-btn {
            background: var(--danger);
            padding: 6px 12px;
            font-size: 12px;
            width: auto;
        }

        .history-list {
            display: grid;
            gap: 10px;
            max-height: 400px;
            overflow-y: auto;
        }

        .history-item {
            background: var(--gray-50);
            padding: 12px;
            border-radius: 8px;
            border: 1px solid var(--gray-200);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            transition: all 0.2s;
        }

        .history-item:hover {
            background: var(--gray-100);
            border-color: var(--primary);
        }

        .history-info {
            flex: 1;
            min-width: 0;
        }

        .history-type {
            font-weight: 600;
            color: var(--primary);
            font-size: 12px;
            margin-bottom: 4px;
        }

        .history-data {
            font-size: 13px;
            color: var(--gray-600);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .history-actions {
            display: flex;
            gap: 6px;
        }

        .history-actions button {
            width: auto;
            padding: 6px 12px;
            font-size: 12px;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: white;
            padding: 24px;
            border-radius: 12px;
            max-width: 500px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .modal-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--gray-900);
        }

        .close-btn {
            background: var(--gray-200);
            color: var(--gray-900);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 20px;
            padding: 0;
        }

        #scanner-container {
            width: 100%;
            height: 300px;
            background: #000;
            border-radius: 8px;
            margin: 15px 0;
            position: relative;
            overflow: hidden;
        }

        #scanner-container video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .scan-result {
            background: var(--gray-50);
            padding: 12px;
            border-radius: 8px;
            margin-top: 12px;
            font-size: 13px;
            color: var(--gray-900);
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .notification {
            position: fixed;
            top: 20px;
            right: 15px;
            left: 15px;
            max-width: 400px;
            margin: 0 auto;
            background: var(--success);
            color: white;
            padding: 14px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 2000;
            display: none;
            font-weight: 600;
            font-size: 14px;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from { transform: translateY(-20px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .icon {
            margin-left: 5px;
            font-size: 1.1em;
        }

        @media (min-width: 768px) {
            .tab-buttons {
                grid-template-columns: repeat(4, 1fr);
            }
            
            h1 {
                font-size: 28px;
            }
            
            .qr-actions {
                grid-template-columns: repeat(4, 1fr);
            }
            
            .notification {
                right: 20px;
                left: auto;
            }
        }

        @media (min-width: 1024px) {
            .tab-buttons {
                grid-template-columns: repeat(8, 1fr);
            }
        }

        @media (max-width: 375px) {
            h1 {
                font-size: 20px;
            }
            
            .settings-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (hover: none) and (pointer: coarse) {
            button, .tab-btn, input, select, textarea {
                min-height: 44px;
            }
        }

        @media print {
            body * {
                visibility: hidden;
            }
            #qrcode, #qrcode * {
                visibility: visible;
            }
            #qrcode {
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
            }
        }