.tool-qr-generator {
    min-height: 100vh;
    background: #F9FAFB;
    padding-bottom: 3rem;
}

.qr-hero {
    background: linear-gradient(135deg, #1F2937 0%, #111827 50%, #0F172A 100%);
    color: #fff;
    padding: 2.5rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.qr-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.qr-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.qr-hero-badge i {
    font-size: 1rem;
}

.qr-hero-content {
    position: relative;
    text-align: center;
}

.qr-hero-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: linear-gradient(145deg, #3B82F6 0%, #2563EB 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

.qr-hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.qr-hero-desc {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.5;
}

.qr-main-container {
    margin-top: -1.5rem;
    position: relative;
}

.qr-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 991px) {
    .qr-layout {
        grid-template-columns: 1fr;
    }
}

.qr-panel {
    min-width: 0;
}

.qr-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.qr-card-body {
    padding: 1.75rem;
}

.qr-label {
    display: block;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.qr-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 1.25rem;
}

.qr-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.qr-input::placeholder {
    color: #9CA3AF;
}

.qr-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
}

.qr-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-section-title i {
    color: #3B82F6;
}

.qr-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.qr-field {
    margin-bottom: 1rem;
}

.qr-sublabel {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 0.375rem;
}

.qr-color-input {
    width: 100%;
    height: 44px;
    padding: 4px;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    cursor: pointer;
    background: #fff;
}

.qr-range {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #E5E7EB;
    border-radius: 4px;
    outline: none;
}

.qr-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    transition: transform 0.15s;
}

.qr-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.qr-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.qr-range::-moz-range-track {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
}

.qr-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9CA3AF;
}

.qr-file-wrap {
    display: block;
    cursor: pointer;
    margin-top: 0.25rem;
}

.qr-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.qr-file-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    min-height: 56px;
    padding: 0.75rem 1rem;
    border: 2px dashed #D1D5DB;
    border-radius: 0.75rem;
    background: #F9FAFB;
    color: #6B7280;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.qr-file-inner i {
    font-size: 1.25rem;
    color: #9CA3AF;
    transition: color 0.2s;
}

.qr-file-wrap:hover .qr-file-inner {
    border-color: #3B82F6;
    background: #EFF6FF;
    color: #2563EB;
}

.qr-file-wrap:hover .qr-file-inner i {
    color: #3B82F6;
}

.qr-file-wrap:focus-within .qr-file-inner {
    border-color: #3B82F6;
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.qr-file-wrap .qr-file-text {
    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E5E7EB;
}

.qr-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}

.qr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.qr-btn-primary {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.qr-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.qr-btn-secondary {
    background: #fff;
    color: #1F2937;
    border: 2px solid #E5E7EB;
}

.qr-btn-secondary:hover:not(:disabled) {
    border-color: #3B82F6;
    color: #3B82F6;
    transform: translateY(-2px);
}

.qr-preview-card {
    position: sticky;
    top: 1.5rem;
}

.qr-preview-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 2rem;
}

.qr-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.qr-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    border-radius: 0.75rem;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

#qr-canvas-container {
    min-height: 256px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-canvas-container:not(:empty) + .qr-placeholder {
    display: none;
}

.qr-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #F3F4F6;
    border: 2px dashed #D1D5DB;
    border-radius: 0.75rem;
    color: #9CA3AF;
    font-size: 0.9rem;
    font-weight: 500;
}

.qr-placeholder i {
    font-size: 3rem;
    opacity: 0.6;
}

@media (max-width: 575px) {
    .qr-hero-title {
        font-size: 1.5rem;
    }
    .qr-hero-desc {
        font-size: 0.9rem;
    }
    .qr-row {
        grid-template-columns: 1fr;
    }
    .qr-actions {
        flex-direction: column;
    }
    .qr-btn {
        width: 100%;
        justify-content: center;
    }
}
