:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --border-color: #dee2e6;
    --grid-bg: #f1f3f5;
}

[data-bs-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e9ecef;
    --border-color: #383838;
    --grid-bg: #2d2d2d;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color) !important;
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--grid-bg) !important;
    color: var(--text-color) !important;
}

.form-control-color {
    height: 40px;
    padding: 0.375rem;
}

#qr-preview canvas, #qr-preview svg, #modal-qr-preview canvas, #modal-qr-preview svg {
    max-width: 100%;
    height: auto;
}

.collapse {
    visibility: visible !important;
}

.navbar {
    position: relative;
    z-index: 1050;
}

.shape-grid {
    background: var(--grid-bg) !important;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.shape-item {
    width: 54px;
    height: 54px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background: #ffffff !important; /* Always white for visibility */
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-item:hover {
    border-color: #00aaff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.shape-item.active {
    border-color: #00aaff;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.15);
}

/* Custom Range Slider */
.custom-range::-webkit-slider-runnable-track {
    background: #e9ecef;
    height: 6px;
    border-radius: 3px;
}

[data-bs-theme="dark"] .custom-range::-webkit-slider-runnable-track {
    background: #383838;
}

.custom-range::-webkit-slider-thumb {
    background: #00aaff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-top: -9px;
}

.custom-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.25rem rgba(0, 170, 255, 0.25);
}

#themeBtn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    border-radius: 50%;
}

#themeBtn:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.shape-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-icon-wrapper svg {
    width: 100%;
    height: 100%;
}
