/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.6;
    min-width: 320px; /* Prevent layout from becoming too cramped on very small screens */
    direction: ltr; /* Enforce left-to-right layout for all languages */
    text-align: left; /* Ensure text alignment is left */
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left .logo {
    height: 40px;
    margin-right: 15px;
}

.header-text {
    display: flex;
    flex-direction: column;
}

.header-top {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #ff6f61;
}

.header-bottom {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
}

/* Navigation Styles */
.nav {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ff6f61;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px 0;
    min-width: 150px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 5px 15px;
}

.dropdown-menu a {
    font-weight: 400;
    color: #333;
}

.dropdown-menu a:hover {
    color: #ff6f61;
}

/* QR Types Selector */
.qr-types {
    background-color: #fff;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.qr-types-scroll-container {
    display: flex;
    align-items: center;
    position: relative;
}

#qrTypeList {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 0 40px;
    margin: 0;
    list-style: none;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

#qrTypeList::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

#qrTypeList li {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.9rem;
    font-weight: 600;
}

#qrTypeList li:hover,
#qrTypeList li.active {
    background-color: #ff6f61;
    color: #fff;
}

.scroll-btn {
    position: absolute;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
    padding: 0 10px;
}

#scrollLeft {
    left: 0;
}

#scrollRight {
    right: 0;
}

/* Settings Section */
.settings {
    padding: 20px 0;
}

.settings-options {
    padding-right: 10px;
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pane {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pane-header {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    background-color: #fafafa;
    transition: background-color 0.3s;
}

.pane-header:hover {
    background-color: #f0f0f0;
}

.pane-header .icon {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #ff6f61;
}

.pane-header .title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.pane-header .plus,
.pane-header .minus {
    font-size: 1rem;
    color: #666;
}

.pane-header .minus {
    display: none;
}

.pane.active .pane-header .plus {
    display: none;
}

.pane.active .pane-header .minus {
    display: block;
}

.pane-content {
    display: none;
    padding: 20px;
}

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

/* Tab Content Styles */
.tab-content {
    display: none; /* Hide all tab content by default */
}

.tab-content.active {
    display: block; /* Show only the active tab content */
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.3s;
}

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

.form-group textarea {
    resize: vertical;
}

.form-group .error-text {
    color: #ff0000;
    font-size: 0.8rem;
    margin-top: 5px;
}

.form-group .text-muted {
    color: #666;
    font-size: 0.8rem;
    margin-top: 5px;
}

.form-check-inline {
    margin-right: 15px;
}

.form-check-label {
    font-size: 0.9rem;
    color: #333;
}

.form-check-input {
    margin-right: 5px;
}

.alert-info {
    background-color: #e7f3fe;
    border: 1px solid #b3d7ff;
    color: #31708f;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Color Picker Styles */
.color-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-group input[type="text"] {
    width: 100px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-group-btn .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-swap,
.btn-copy {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-swap:hover,
.btn-copy:hover {
    background-color: #e0e0e0;
}

.overflow-visible {
    overflow: visible !important;
}

/* Shape Options */
.shape-group {
    margin-bottom: 20px;
}

.shape-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.shape {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.shape:hover,
.shape.active {
    border-color: #ff6f61;
    background-color: #fff3f2;
}

.shape i {
    font-size: 1.2rem;
    color: #333;
}

/* Logo Preview */
.logo-preview {
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
}

.logo-preview .placeholder {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
}

.btn-upload,
.btn-default {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-upload {
    background-color: #ff6f61;
    color: #fff;
}

.btn-upload:hover {
    background-color: #e65a50;
}

.btn-default {
    background-color: #f0f0f0;
    color: #333;
}

.btn-default:hover {
    background-color: #e0e0e0;
}

.flex-row {
    display: flex;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
    gap: 10px;
}

/* Template Styles */
.template {
    text-align: center;
    cursor: pointer;
}

.template-preview {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 5px;
}

.template p {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
}

/* Ensure Two-Column Layout */
.row.inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap; /* Prevent wrapping to ensure columns stay side by side */
    align-items: flex-start;
}

/* Preview Section */
.preview {
    padding-left: 10px;
    flex: 0 0 auto; /* Prevent shrinking or growing */
}

.preview-inner {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

/* Make preview sticky at all screen sizes */
.preview {
    position: sticky;
    top: 20px; /* Adjust based on header height */
    align-self: flex-start; /* Ensure it sticks to the top of its container */
    height: fit-content; /* Allow it to take its natural height */
}

/* Ensure preview and settings columns are usable on small screens */
@media (max-width: 767px) {
    .settings-options {
        padding-right: 5px;
    }

    .preview {
        padding-left: 5px;
    }

    #qrPreviewCanvas {
        max-width: 100%;
        width: 100%;
        height: auto; /* Maintain aspect ratio */
    }

    .preview-footer .btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

.preview-header {
    margin-bottom: 15px;
}

.preview-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.preview-body {
    text-align: center;
}

#qrPreviewCanvas {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Resolution Slider Styles */
.resolution-control {
    margin-bottom: 15px;
}

.resolution-control label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;