:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #334155;
    --text-muted: #64748b;
    font-size: 13px;
}

body {
    font-family: 'Nanum Gothic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.08), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.07), transparent 30%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    margin: 0;
}

.app-container {
    max-width: 900px;
    width: 100%;
}

.app-header {
    animation: fadeInDown 0.5s ease-out;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
}

.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    padding-bottom: 12px;
    transition: all 0.2s;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
    background: transparent;
    font-weight: 700 !important;
}

.nav-tabs .nav-link:hover:not(.active) {
    border-color: #e2e8f0;
    color: var(--text-main);
}

.fs-sm {
    font-size: 0.95rem;
}

.custom-input {
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 1.05rem;
    padding: 14px;
    resize: none;
    background-color: #ffffff;
}
.custom-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Shape Buttons */
.shape-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.3rem;
}
.shape-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Color Picker */
.custom-color-picker {
    width: 50px;
    height: 40px;
    padding: 2px;
    border-radius: 8px;
    cursor: pointer;
}

/* Frame Selection */
.frame-item {
    width: 65px;
    height: 65px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    overflow: hidden;
}
.frame-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
.frame-preview {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

/* QR Code Display & Frames */
.qr-preview-area {
    min-height: 280px;
}

#qrFrameWrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.3s ease;
    border-radius: 12px;
}

/* Base QRCode Inner Wrapper wrapper */
.qr-wrapper {
    width: 220px;
    height: 220px;
    border: 1px dashed #cbd5e1;
    position: relative;
    border-radius: 8px;
    overflow: visible;
    padding: 10px; /* 미리보기 시 살짝 여백을 주어 확대되는 느낌 감소 */
    box-sizing: border-box;
}
.qr-wrapper svg, .qr-wrapper canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.empty-text {
    position: absolute;
    color: #94a3b8;
}

/* Frame Styles */
.qr-frame-none {
    padding: 5px;
}

.qr-frame-scanme-top {
    background-color: var(--primary-color) !important;
    padding: 15px 15px 20px 15px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.qr-frame-scanme-top #frameTopText {
    display: block !important;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.qr-frame-scanme-bottom {
    background-color: transparent !important;
    border: 4px solid var(--primary-color);
    padding: 15px 15px 10px 15px !important;
    border-radius: 16px !important;
}
.qr-frame-scanme-bottom #frameBottomText {
    display: block !important;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.2rem;
    margin-top: 10px;
    letter-spacing: 1px;
}

.qr-frame-bubble {
    background-color: #1e293b !important;
    padding: 20px !important;
    border-radius: 35px !important;
    position: relative;
}
.qr-frame-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px 15px 0;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}
.qr-frame-bubble #frameTopText {
    display: block !important;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.qr-frame-minimal {
    border: 2px solid #334155;
    padding: 20px !important;
    border-radius: 4px !important;
}
.qr-frame-minimal #frameTopText {
    display: block !important;
    color: #334155;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
    letter-spacing: 4px;
}

/* Button */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
}
.btn-primary:not(:disabled):hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
